Data transmission method and apparatus
The wireless screen sharing device solves the problem of screen sharing devices failing to transmit properly after being connected to a computer by automatically detecting and switching between DP and USB 2.0 protocols, achieving efficient transmission without the need for manual switching.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-28
- Publication Date
- 2026-03-24
AI Technical Summary
In existing technologies, when a screen sharing device fails to transmit content properly after being connected to a computer, the user needs to manually switch interfaces or replace the device, which is cumbersome and time-consuming.
The wireless screen sharing device connects to the terminal device via a Type-C interface and automatically detects media data in DP protocol format. If no data is received, it switches to media data transmission in USB 2.0 protocol format, thus achieving automatic switching of transmission modes.
It simplifies user operation, avoids manual switching, improves the efficiency of the screen sharing device, and saves time.
Smart Images

Figure CN115878537B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computers, and more specifically to a data transmission method and apparatus. Background Technology
[0002] In multi-person meetings, users can connect their computers to a screen sharing device to project the content displayed on their computer screen, such as a PowerPoint presentation, onto a larger display, such as an interactive smart panel or a TV, making it easier for users to share content with participants.
[0003] There are existing screen sharing devices that can connect to a computer's Type-C interface via their Type-C port. However, in actual use, when these screen sharing devices fail to transmit computer content to the monitor after connection, the common solution is for the user to manually switch the computer's connection interface or replace the screen sharing device, which is cumbersome and time-consuming. Summary of the Invention
[0004] This application provides a data transmission method and apparatus that can improve the problems of cumbersome operation and wasted time in the prior art.
[0005] This application provides a data transmission method. The wireless screen sharing device includes a Type-C interface and supports DP and USB 2.0 protocol communication. The method includes: when the Type-C interface is connected to a terminal device, initiating a handshake between the DP protocol and USB 2.0 protocol with the terminal device; when the DP protocol handshake is successful, determining whether media data in DP protocol format is received within a preset time, wherein the DP protocol format media data is generated by processing the media data currently displayed on the terminal device's screen based on the DP protocol; if the DP protocol format media data is not received, sending a switching command to the terminal device, wherein the switching command is used to cause the terminal device to perform screenshot and encoding processing on the currently displayed media data; and receiving media data in USB 2.0 protocol format sent by the terminal device, wherein the USB 2.0 protocol format media data is generated by processing the media data after screenshot and encoding processing on the terminal device based on the USB 2.0 protocol.
[0006] This application embodiment also provides a data transmission method applied to a wireless screen sharing device. The wireless screen sharing device includes a Type-C interface, a first data conversion chip, and a processor. The Type-C interface is connected to the processor through the first data conversion chip. The Type-C interface includes differential signal pins and USB 2.0 data pins.
[0007] The method includes:
[0008] Media data in DP protocol format sent by the terminal device is received through the differential signal pin;
[0009] The received media data in the DP protocol format is sent to the first data conversion chip;
[0010] The first data conversion chip converts the media data in the DP protocol format into MIPI format data, obtains target parameters based on the media data in the DP protocol format, and sends the MIPI format data and the target parameters to the processor.
[0011] When the processor does not receive the MIPI format data within a first preset time, or does not obtain the target parameter within a second preset time, or determines within a third preset time that the first data conversion chip has not received the media data in the DP protocol format, it switches to receiving media data in the USB 2.0 protocol format through the USB 2.0 data pin.
[0012] This application embodiment also provides a data transmission device, including a Type-C interface, a first data conversion chip, a processor, a memory, and a wireless module. The Type-C interface includes a first data pin and a second data pin. The first data pin is connected to the processor through the first data conversion chip, and the second data pin is connected to the processor. The processor is connected to the memory and the wireless module respectively.
[0013] The first data pin is used to receive media data in DP protocol format, and the second data pin is used to receive media data in USB 2.0 protocol format.
[0014] The first data conversion chip is used to receive media data in the DP protocol format, convert the received media data in the DP protocol format into MIPI format data, obtain target parameters based on the media data in the DP protocol format, and send the MIPI format data and the target parameters to the processor.
[0015] The processor is used to receive media data in USB 2.0 protocol format through the second data pin when it does not receive the MIPI format data within a first preset time, or does not obtain the target parameter within a second preset time, or determines that the first data conversion chip has not received media data in DP protocol format within a third preset time.
[0016] In the data transmission method provided in this application embodiment, when the Type-C interface is connected to the terminal device, a handshake process for establishing DP protocol and USB 2.0 protocol with the terminal device can be initiated. When the handshake is successful, it is determined whether media data in DP protocol format is received within a preset time. The media data in DP protocol format is generated by processing the media data currently displayed on the terminal device's screen based on the DP protocol. If the media data in DP protocol format is not received, a switching command is sent to the terminal device; wherein, the switching command is used to instruct the terminal device to perform screenshot and encoding processing on the currently displayed media data; the wireless screen sharing device receives the media data in USB 2.0 protocol format sent by the terminal device. The media data in USB 2.0 protocol format is generated by processing the media data after the terminal device has been screenshotted and encoded based on the USB 2.0 protocol. If the media data in DP protocol format cannot be received within the preset time, it indicates that the wireless screen sharing device cannot work normally in DP transmission mode. Therefore, the wireless screen sharing device can use USB 2.0 transmission mode to transmit data with the terminal device to obtain the media data in USB 2.0 protocol format corresponding to the USB 2.0 transmission mode. The above implementation allows the wireless screen sharing device to automatically switch to USB 2.0 transmission mode when it cannot operate normally in DP transmission mode, avoiding manual switching by the user, simplifying operation, and saving time. Since the wireless screen sharing device can quickly enter normal working state when DP transmission mode fails and USB 2.0 transmission mode is normal, without requiring manual switching by the user, it can improve the problems of cumbersome operation and wasted time in existing technologies.
[0017] This application can improve the working efficiency of wireless screen sharing devices and save time. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a schematic diagram of a scenario shown in an embodiment of this application;
[0020] Figure 2 This is a schematic diagram of one embodiment of the wireless screen sharing device provided in this invention.
[0021] Figure 3 This is a flowchart illustrating the data transmission method provided in an embodiment of this application;
[0022] Figure 4This is a timing diagram of the data transmission method provided in the embodiments of this application;
[0023] Figure 5 This is a flowchart illustrating a data transmission method provided in another embodiment of this application;
[0024] Figure 6 This is a schematic flowchart of a data transmission method provided in another embodiment of this application;
[0025] Figure 7 This is a schematic diagram of a data transmission virtual device provided in an embodiment of this application;
[0026] Figure 8 This is a schematic structural block diagram of a specific implementation of the wireless screen sharing device provided in this application. Detailed Implementation
[0027] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0028] First, let's explain the usage scenarios of screen sharing devices, taking the use of screen sharing devices in meetings as an example. For details, please refer to [link to relevant documentation]. Figure 1 .
[0029] like Figure 1 As shown, Figure 1 The conference system provided in this embodiment includes a computer 1, a connection cable 2, a screen sharing device 3, and an interactive whiteboard 4.
[0030] The screen sharing device 3 has the function of sharing desktop media data, such as PPT, video or audio. It can also be called a screen projection device, wireless screen projector or screen sharing device.
[0031] Computer 1 and screen sharing device 3 can communicate with each other via data. For example, a connection cable 2 can be used to connect them via wired communication. Connection cable 2 can be a Universal Serial Bus (USB) cable, a High Definition Multimedia Interface (HDMI) cable, a Type-C cable, or a network cable, etc. Connection cable 2 and screen sharing device 3 can be integrally formed or separately formed. In this embodiment, screen sharing device 3 and Type-C connection cable are integrally formed.
[0032] Taking the scenario where a user needs to share a meeting document on computer 1 as an example, due to the limited screen size of computer 1, the user can connect computer 1 to screen sharing device 3 using connection cable 2, and then transmit the meeting document displayed on the screen of computer 1 to the interactive whiteboard 4 mounted on the wall for display through screen sharing device 3.
[0033] Interactive flat panel 4, also known as interactive smart flat panel, smart interactive flat panel, smart interactive whiteboard, large-screen flat panel, etc., consists of a touch display module, an intelligent processing system (including a controller), and other components. These are integrated into a single structural unit and supported by a dedicated software system. The touch display module includes a display screen, touch components, and a backlight assembly. The backlight assembly provides backlighting for the display screen, which typically uses an LCD display for image display. The touch components are located on or in front of the display screen and are used to collect user touch operation data, which is then sent to the intelligent processing system for processing.
[0034] Screen sharing can only be performed after the interactive whiteboard 4 and the screen sharing device 3 establish a data connection. Screen sharing refers to displaying content from one screen to another, such as displaying content from a computer screen to the interactive whiteboard 4, or displaying content from a mobile phone screen to the interactive whiteboard 4 or a television screen. The screen sharing device 3 is the transmission medium between the two screens involved in the screen sharing process. It can establish a wired connection with the device containing one of the screens via an interface, and a wireless connection with the devices containing both screens via a wireless module.
[0035] The screen sharing device 3 and the interactive flat panel 4 can be connected wirelessly, including but not limited to Wi-Fi, Bluetooth or other short-range wireless communication methods.
[0036] Secondly, in the above scenarios, there may be a problem where the screen sharing device cannot transfer the computer's content after being connected. Specifically, in conjunction with... Figure 2 Perform the analysis.
[0037] like Figure 2 As shown, Figure 2 This is a schematic diagram of one embodiment of the wireless screen sharing device provided in this invention. The screen sharing device 3 may include a Type-C interface 11, a processor 12, a memory 13, and a wireless module 14. The processor 12 is connected to the Type-C interface 11, the memory 13, and the wireless module 14.
[0038] For example, if the Type-C interface of some computers does not support DP format transmission or the DP channel of the screen sharing device is faulty, the screen sharing device may be unable to directly transmit DP format audio and video data. A common practice in related technologies is to equip the device with an interface adapter. When the user finds that the interactive whiteboard 4 fails to display its screen, they can manually replace the interface adapter (such as a Type-C to USB 2.0 adapter) to allow the screen sharing device 3 to be plugged into other interfaces of the computer 1 (such as a USB 2.0 interface), or the user can be directly prompted to replace the screen sharing device 3 with a new one. This process is cumbersome and results in a poor user experience.
[0039] like Figure 2 As shown, the screen sharing device 3 has a Type-C interface 11, which may include a bus power VBUS pin. Users can plug this Type-C interface 11 into a computer's Type-C port. The computer can provide a basic operating voltage to the screen sharing device 3 through the bus power VBUS pin of the Type-C interface 11. This operating voltage can be 5V or other voltages, and the screen sharing device 3 will start operating under the supply of this basic voltage.
[0040] Among them, the Type-C interface 11 is USB-Type-C. USB-Type-C is a hardware interface specification for Universal Serial Bus (USB), which has faster transmission speeds (up to 10Gbps) and more powerful power delivery (up to 100W), and is compatible with USB 2.0, USB 3.0 and DP (DisplayPort).
[0041] The differential signal transmission pins in the Type-C interface 11 can be used as a DP interface to transmit DP video data; the USB 2.0 data transmission pins D+ and D- in the Type-C interface 11 can be connected to the corresponding pins in the terminal device by direct plugging or connecting to an interface converter, and are used to receive USB 2.0 data output by the terminal device.
[0042] The processor 12 is the control center of the wireless screen transmitter 3. It connects various parts of the wireless screen transmitter 3 through various interfaces and lines. By running or executing software programs and / or modules stored in the memory 13, and calling data stored in the memory 13, it performs various functions of the wireless screen transmitter 3 and processes data, thereby monitoring the wireless screen transmitter 3 as a whole.
[0043] The memory 13 stores an executable program that, after being downloaded to the terminal device, is executed by the first processor of the terminal device. This causes the first processor to compress the audio and video data currently output to the first display into media data in USB 2.0 protocol format, and output the USB 2.0 protocol format media data from the Type-C socket of the terminal device. It is understood that the Type-C interface 11 in this embodiment can receive both USB 2.0 protocol format audio and video data encoded and compressed by the terminal device, and uncompressed DP protocol format audio and video data from the terminal device.
[0044] The wireless module 14 is a modular product implemented using wireless communication technology. It can wirelessly transmit received signals to a wireless communication network, allowing the signals to be captured by network nodes within the network. Examples include WiFi, Bluetooth, and ZigBee modules, which are widely used in short-range local area network communication. The wireless module 14 provided in this embodiment can transmit the audio and video data obtained from the terminal device to other network nodes in the wireless communication network for video display. Generally, following the common interface configurations in existing technology, the Type-C interface 11 on the wireless screen sharing device 3 is configured as a plug, while the video signal interface on the terminal device is configured as a socket. For ease of description and explanation, this specification uses the example of a socket on the terminal device and a plug on the wireless screen sharing device to illustrate the technical solution. In a conference setting, the Type-C interface 11 of the wireless screen sharing device 3 can be plugged into the video signal interface of a personal computer. The network node module of the large-screen tablet used in the conference is paired and connected to the wireless module 14 of the wireless screen sharing device 3 within the same wireless communication network. This allows the audio and video data corresponding to the monitor screen of the personal computer to be transmitted to the large-screen tablet used in the conference, achieving wireless screen sharing without the need to download drivers on the personal computer.
[0045] The wireless screen sharing device in this application embodiment may include a data conversion chip. The data conversion chip can be connected between the Type-C interface and the processor. The data conversion chip can convert the DP protocol format media data received by the Type-C interface of the wireless screen sharing device into MIPI format data.
[0046] Based on this, embodiments of this application provide a data transmission method, such as... Figure 3 As shown, this data transmission method is applied to, for example... Figure 1 The screen sharing device 3 shown can be electrically connected to computer 1 (i.e., terminal device). The computer 1 will be used as an example for specific explanation below. The specific process of this method may include steps 101 to 104 as follows; please refer to [link / reference] for details. Figure 3 and Figure 4 :
[0047] 101. When the Type-C interface is connected to the terminal device, initiate the handshake between the terminal device and the DP protocol and USB 2.0 protocol.
[0048] The purpose of establishing a handshake between the DP protocol and USB 2.0 protocol and the terminal device is to obtain media data in DP protocol format. After confirming the connection between the screen sharing device 3 and the computer, the computer can send an inquiry data packet to the screen sharing device 3 through the CC pin of the Type-C interface. This inquiry data packet can contain information customized by the vendor. Upon receiving this signal, the screen sharing device 3 sends a corresponding response message to the computer through its CC pin. The response message describes the device attributes of the screen sharing device 3, specifically including the current or supported operating modes of the screen sharing device 3, the specific power supply range, and a description of the device type as an external storage device. The computer can set the power supply voltage to the screen sharing device 3 based on the power supply range information.
[0049] For example, `run_mode` can be used as the transmission mode number. If `run_mode` is set to 1, the wireless screen sharing device operates in DP transmission mode; if `run_mode` is set to 0, the wireless screen sharing device operates in USB 2.0 transmission mode. DP transmission mode is a specific example of Type-C transmission mode, and USB 2.0 transmission mode is a specific example of Type-A transmission mode.
[0050] For example, the response information sent by the screen sharing device 3 to the computer may include the screen sharing device 3's current operating mode being DP transmission mode. After receiving the response information from the screen sharing device 3, if the computer confirms that the screen sharing device 3's current operating mode is DP transmission mode, it can set the computer's Type-C interface to work in DP transmission mode and call the DP driver pre-installed in the computer's operating system. For example, if the computer supports a Type-C interface, it can transmit media data in DP protocol format, including audio and video, to the differential signal transmission pin pair (as a DisplayPort interface) of the screen sharing device 3 through the differential pins of the computer's Type-C interface.
[0051] 102. When the DP protocol handshake is successful, determine whether media data in DP protocol format has been received within a preset time. If not, proceed to step 103.
[0052] The media data in DP protocol format is generated by processing the media data currently displayed on the screen of the terminal device based on the DP protocol.
[0053] If media data in DP protocol format is not received within the preset time, it means that the wireless screen sharing device is currently unable to work properly in Type-C transmission mode (i.e., DP transmission mode), so step 103 is executed.
[0054] 103. Send a switching command to the terminal device, the switching command being used to enable the terminal device to perform screenshot and encoding processing on the currently displayed media data.
[0055] The computer can encode media data to obtain media data in USB 2.0 protocol format. The screen sharing device can transmit media data in USB 2.0 protocol format via the USB 2.0 data transmission pins D+ and D- on the Type-C port. When transmitting media data in USB 2.0 protocol format, the screen sharing device operates in Type-A transmission mode.
[0056] In the above implementation, if media data in DP protocol format cannot be received within a preset time, it indicates that the wireless screen sharing device is currently unable to work normally in Type-C transmission mode. Therefore, the wireless screen sharing device can use Type-A transmission mode to transmit data with the computer to obtain media data in the corresponding USB 2.0 protocol format. This implementation allows the wireless screen sharing device to automatically switch to Type-A transmission mode when it cannot work normally in Type-C transmission mode, avoiding manual switching by the user, simplifying operation, and saving time.
[0057] Optionally, in one specific embodiment, after step 102, the method provided in this application embodiment may further include the following steps:
[0058] If media data in the DP protocol format is received, it is determined whether the target parameter has been obtained within a preset time period. The target parameter is obtained by recognizing and processing the media data in the DP protocol format. If the target parameter is not obtained, a switching instruction is sent to the terminal device. The switching instruction is used to enable the terminal device to take a screenshot and encode the currently displayed media data.
[0059] Optionally, in actual application of the product, when the data conversion chip cannot identify the target parameters, the processor cannot process data based on the target parameters, thus causing the wireless screen sharing device to malfunction. It is understood that the target parameters are those required for the wireless screen sharing device to function normally in Type-C transmission mode; that is, the wireless screen sharing device can only function normally in Type-C transmission mode after acquiring the target parameters. The target parameters can be the resolution parameters of the terminal device, or other parameters. The specific parameter type of the target parameters should not be construed as a limitation of this application.
[0060] The data conversion chip in this application embodiment can also calculate the target parameters according to the data in DP protocol format, and send the target parameters together with the data in MIPI format to the processor. The processor encodes the data in MIPI format based on the target parameters.
[0061] The data conversion chip and the processor are physically connected via an Inter-Integrated Circuit (IIC or I2C) bus and a Mobile Industry Processor Interface (MIPI) signal line. The IIC bus is used to transmit control data, such as target parameters, while the MIPI signal line is used to transmit video data, such as MIPI format data. When the processor receives the target parameters transmitted by the IIC bus, it controls the acquisition of video data from the data conversion chip through the MIPI signal line.
[0062] For example, after the wireless screen sharing device receives media data in DP protocol format via its Type-C interface, it can send the DP protocol format media data to a data conversion chip. Upon receiving the DP protocol format media data, the data conversion chip can calculate target parameters, such as resolution. The data conversion chip can also convert the DP protocol format media data into MIPI format data. MIPI format data is a data format suitable for processors. For example, the data conversion chip can convert the video portion of the media data into MIPI format data and the audio portion into I2S format data. After format conversion by the data conversion chip, the target parameters and the two formatted media data can be provided to the processor. If the wireless screen sharing device does not obtain the target parameters within a preset time period, it indicates that the wireless screen sharing device cannot work normally in Type-C transmission mode within the preset time period. In this case, a switching command is sent to the terminal device, which is used to cause the terminal device to perform screenshot and encoding processing on the currently displayed media data.
[0063] Optionally, in one specific embodiment, the step "sending a switching instruction to the terminal device, the switching instruction being used to cause the terminal device to perform screenshot and encoding processing on the currently displayed media data" may specifically include the following steps 121 to 123:
[0064] 121. Switch the transmission mode from the Type-C transmission mode to the Type-A transmission mode so that the terminal device can encode the media data to obtain media data in USB 2.0 protocol format.
[0065] For example, a computer can receive a second application from a wireless screen sharing device. The second application integrates a screen sharing service program, which automatically runs the second application when the wireless screen sharing device is connected to the terminal device.
[0066] When the computer has the second application running, if the wireless screen sharing device switches from Type-C transmission mode to Type-A transmission mode, it sends a mode switch command to the computer. Upon receiving this command, the computer automatically runs the second application and uses it to capture screenshots of the computer's media data. The second application can also encode this captured data to obtain media data in USB 2.0 protocol format. It should be noted that the computer can obtain the second application in other ways as well; for example, it can also obtain and install the second application from other third-party devices or specific websites.
[0067] Specifically, the wireless screen sharing device's memory can pre-store a second application. When the computer receives the second application from the wireless screen sharing device for the first time, the operation process can be as follows:
[0068] As described above, the computer can receive response information sent by the wireless screen sharing device. After receiving the response information, the computer can also display the drive letter of the corresponding external storage device according to its device type description. When the computer does not have a second application installed (such as when the computer is first paired or connected to the wireless screen sharing device, or when the computer has installed and then uninstalled the second application), the user needs to open the corresponding drive letter of the wireless screen sharing device on the computer to display the content stored in the wireless screen sharing device's storage space, i.e., the icon corresponding to the program stored in the wireless screen sharing device, such as the icon of the second application. When a double-click or right-click operation is received for the second application icon, the second application stored on the wireless screen sharing device is loaded into the computer's memory through the USB 2.0 data transmission pins D+ and D- in the Type-C interface 11 for execution by the computer's processor. In some embodiments, when the computer does not have a second application installed, the wireless screen sharing device can send a pop-up command to the interactive tablet that is paired with it, causing the interactive tablet to display a prompt box to prompt the user to manually open the corresponding drive letter on the computer and install the second application.
[0069] The second application integrates a screen sharing service program for automatically running the second application. After the user installs the second application for the first time, the screen sharing service program will run in the background of the computer, so that the second application will start automatically when the computer is plugged into the wireless screen sharing device for the second time, without the need for manual operation by the user.
[0070] When the computer has already started the second application, if the wireless screen sharing device switches from Type-C transmission mode to Type-A transmission mode, it sends a switching command to the computer. After receiving the switching command, the computer will automatically run the second application and use the second application to take screenshots of the computer's media data to obtain screen capture data. The second application can also encode the screen capture data to obtain media data in USB 2.0 protocol format.
[0071] It should be noted that the ways a computer obtains a second application are not limited to this. For example, a computer can also obtain and install a second application from other third-party devices or specific websites.
[0072] Optionally, in some specific embodiments, step 121 may specifically include the following step: determining whether the terminal device has a second application installed;
[0073] If so, a switching command is sent to the terminal device to instruct the terminal device to run the second application and encode the media data through the second application to obtain the media data in the USB 2.0 protocol format;
[0074] If not, a pop-up command is sent to the display device paired with the wireless screen sharing device to instruct the user to install the second application.
[0075] In the above implementation, the wireless screen sharing device can first determine whether the terminal device has a second application installed. If it does, the wireless screen sharing device sends a switching command to the terminal device, instructing the terminal device to run the second application and then encode and process the media data through the second application. If it does not have the second application installed, a pop-up command is displayed on the display device paired with the wireless screen sharing device to instruct the user to install the second application. Specifically, the terminal device can encode and process the media data by running the second application stored within itself; this method can improve the stability of the encoding and processing.
[0076] In some embodiments, the second application integrates a screen sharing service program, which is used to automatically run the second application when the wireless screen sharing device is connected to the terminal device.
[0077] Optionally, before the terminal device runs the second application, the wireless screen sharing device can also perform the following steps: run iptables routing rules to switch the screen sharing device network segment.
[0078] When the wireless screen sharing device operates in Type-A transmission mode, the hardware interface connecting the device to the terminal device is virtually a wired network card, which has its own wired network segment; the wireless module within the device has its own wireless network segment. When the wireless screen sharing device transmits data via Type-A mode, the media data transmission path is: the hardware interface of the wireless screen sharing device (virtually a wired network card) - the processor of the wireless screen sharing device - the wireless module of the device - the display device. Therefore, the wireless screen sharing device can switch between the wired and wireless network segments by running iptables routing rules.
[0079] 122. Receive media data in the USB 2.0 protocol format sent by the terminal device.
[0080] For example, the wireless screen sharing device receives media data in USB 2.0 protocol format sent by the terminal device through the USB 2.0 data transmission pins D+ and D- in the Type-C interface 11.
[0081] 123. The media data in the USB 2.0 protocol format is transmitted to the display device so that the display device can decode and display the media data corresponding to the media data in the USB 2.0 protocol format.
[0082] After receiving media data in USB 2.0 protocol format sent by the terminal device, the wireless screen sharing device can use its own wireless module, such as... Figure 2 The wireless module 14 shown transmits media data in USB 2.0 protocol format to the display device for display.
[0083] In the above implementation, if the target parameter is not received within a preset time period, the wireless screen transmitter will automatically switch its own transmission mode. This allows it to quickly enter the normal working state when one of the two transmission modes is in a faulty state and the other is in a normal state, without requiring manual switching by the user. This improves the problem of cumbersome operation and wasted time in the prior art.
[0084] Optionally, in one specific embodiment, after the step of "determining whether the target parameter is obtained within the preset time period", the method provided in this application embodiment may further include the following steps S1 to S3:
[0085] S1. If the target parameter is received within the preset time period, the received DP protocol format media data is converted into MIPI format data.
[0086] As described above, the data conversion chip of the wireless screen sharing device can be connected between the Type-C interface and the processor. The data conversion chip can convert the DP protocol format media data received by the Type-C interface of the wireless screen sharing device into MIPI format data. For example, after receiving DP protocol format media data, the Type-C interface of the wireless screen sharing device can send the DP protocol format media data to the data conversion chip. After receiving the DP protocol format media data, the data conversion chip can convert the data format to MIPI format data. MIPI format data is a data format suitable for the processor. For example, the data conversion chip can convert the video portion of the media data into MIPI format data and the audio portion into I2S format data. After the format conversion by the data conversion chip, these two formatted media data can be provided to the processor.
[0087] S2. Encode the MIPI format data to obtain the encoding result.
[0088] The data conversion chip of the wireless screen sharing device sends MIPI format data to the processor in the wireless screen sharing device. After receiving the MIPI format data, the processor can compress and encode the MIPI format data.
[0089] Optionally, in one specific embodiment, the wireless screen sharing device stores a first application; accordingly, step S2 includes the following steps S21 to S22:
[0090] S21. Run the first application.
[0091] S22. The MIPI format data is encoded using the first application to obtain the encoding result.
[0092] The wireless screen sharing device's memory can pre-store a first application program. The processor can retrieve the first application program from the memory and execute it. The first application program can compress and encode MIPI format data.
[0093] In the above implementation, the wireless screen sharing device can encode media data by running a first application stored within it. This first application can be customized for the wireless screen sharing device without requiring compatibility with other hardware, thus resulting in a lower error rate and higher stability.
[0094] S3. The encoding result is transmitted to the display device so that the display device can decode and display the media data corresponding to the encoding result.
[0095] Wireless screen sharing devices can transmit encoded results to display devices via a communication network using their built-in wireless module. The display device acts as the receiving end for the screen sharing, such as... Figure 1 The interactive flat panel 4 in the diagram allows the display device to receive encoding results, decode them to obtain media data, and then display the media data. The display device may include a receiving box, which can be integrated with the display device or designed separately. This receiving box receives media data from the wireless screen sharing device and transmits it to the display device for display.
[0096] In addition, it should be noted that when the processor of the wireless screen sharing device receives the screen sharing command output by the user, it starts to compress and encode the received audio media data and processed video media data (or it may be unprocessed); before the processor of the wireless screen sharing device receives the screen sharing command output by the user, although media data is being received, the received audio and / or video media data is discarded without compression or transmission processing, thus saving the processor resources of the wireless screen sharing device. That is, step S3 can be the step executed after confirming that the screen sharing command has been received.
[0097] In the above implementation, if the wireless screen sharing device is in Type-C transmission mode and acquires the target parameters within a preset time period, the wireless screen sharing device can continue to operate in Type-C transmission mode: collecting media data from the terminal device, encoding the media data, obtaining the encoding result, and transmitting the encoding result to the display device. If the wireless screen sharing device receives the target parameters within the preset time period, it can continue screen sharing in Type-C transmission mode, thereby improving the screen sharing speed.
[0098] Optionally, in one specific embodiment, step 103 may specifically include the following steps 1031 to 1033:
[0099] 1031. If media data in the DP protocol format is not received, determine whether the terminal device has a second application installed. If yes, proceed to step 1032; if no, proceed to step 1033.
[0100] The second application integrates a screen sharing service program, which is used to automatically run the second application when the wireless screen sharing device is connected to the terminal device.
[0101] 1032. Send a switching command to the terminal device to instruct the terminal device to run the second application and perform screenshot and encoding processing on the currently displayed media data through the second application.
[0102] 1033. Send a pop-up command to the display device paired with the wireless screen sharing device to instruct the user to install the second application.
[0103] In the above implementation, the wireless screen sharing device can first determine whether the terminal device has a second application installed. If it does, the wireless screen sharing device sends a switching command to the terminal device, instructing the terminal device to run the second application and then encode and process the media data through the second application. If it does not have the second application installed, a pop-up command is displayed on the display device paired with the wireless screen sharing device to instruct the user to install the second application. Specifically, the terminal device can encode and process the media data by running the second application stored within itself; this method can improve the stability of the encoding and processing.
[0104] Optionally, when the computer does not have a second application installed, the wireless screen sharing device can send a pop-up command to the interactive flat panel that is paired with it, causing the interactive flat panel to display a prompt box to remind the user to manually open the corresponding drive on the computer and install the second application.
[0105] 104. Receive media data in USB 2.0 protocol format sent by the terminal device.
[0106] The media data in the USB 2.0 protocol format is generated by processing the media data after the terminal device has been captured and encoded based on the USB 2.0 protocol.
[0107] In the data transmission method provided in this application embodiment, when the Type-C interface is connected to the terminal device, a handshake process for establishing DP protocol and USB 2.0 protocol with the terminal device can be initiated. When the handshake is successful, it is determined whether media data in DP protocol format is received within a preset time. The media data in DP protocol format is generated by processing the media data currently displayed on the terminal device's screen based on the DP protocol. If the media data in DP protocol format is not received, a switching command is sent to the terminal device; wherein, the switching command is used to instruct the terminal device to perform screenshot and encoding processing on the currently displayed media data; the wireless screen sharing device receives the media data in USB 2.0 protocol format sent by the terminal device. The media data in USB 2.0 protocol format is generated by processing the media data after the terminal device has been screenshotted and encoded based on the USB 2.0 protocol. If the media data in DP protocol format cannot be received within the preset time, it indicates that the wireless screen sharing device cannot work normally in Type-C transmission mode. Therefore, the wireless screen sharing device can use Type-A transmission mode to transmit data with the terminal device to obtain the media data in USB 2.0 protocol format corresponding to Type-A transmission mode. The above implementation allows the wireless screen sharing device to automatically switch to Type-A transmission mode when it cannot operate normally in Type-C transmission mode, avoiding manual switching by the user, simplifying operation, and saving time. Since the wireless screen sharing device can quickly enter normal working condition when Type-C transmission mode fails but Type-A transmission mode is normal, without requiring manual switching by the user, it can improve the problems of cumbersome operation and wasted time in existing technologies.
[0108] This application can improve the working efficiency of wireless screen sharing devices and save time.
[0109] In this embodiment, the method of this application embodiment will be described in detail, taking the target parameter as a resolution parameter as an example.
[0110] like Figure 6 As shown, the specific process of a data transmission method is as follows:
[0111] 201. When the Type-C interface of the wireless screen sharing device is connected to the terminal device, a handshake relationship is established between the DP protocol and the USB 2.0 protocol and the terminal device.
[0112] 202. Determine whether the resolution parameters have been obtained within the preset time period. If yes, proceed to step 203; otherwise, proceed to step 206.
[0113] 203. Collect the aforementioned media data.
[0114] 204. Run the first application stored in the wireless screen sharing device, and encode the media data through the first application to obtain the encoding result.
[0115] 205. The encoding result is transmitted to the display device so that the display device decodes and displays the media data corresponding to the encoding result.
[0116] 206. Send a switching command to the terminal device, the switching command being used to enable the terminal device to take a screenshot and encode the currently displayed media data to obtain an encoding result.
[0117] 207. Receive the encoding result sent by the terminal device.
[0118] 208. The encoded result is transmitted to the display device so that the display device can decode and display the media data in USB 2.0 protocol format corresponding to the encoded result. As can be seen above, the initial transmission mode of the wireless screen sharing device is Type-C mode (i.e., the mode where the DP protocol and USB 2.0 protocol successfully handshake with the terminal device). In this mode, the wireless screen sharing device determines whether to maintain Type-C mode or switch to Type-A mode (i.e., the mode for transmitting media data in USB 2.0 protocol format) based on whether it obtains the resolution parameters within a preset time period. If it maintains Type-C mode, the wireless screen sharing device can encode the media data to obtain the encoded result; if it switches to Type-A mode, the terminal device can encode the media data to obtain the encoded result, and then send it to the wireless screen sharing device, which then transmits the encoded result to the display device. Since the wireless screen sharing device can quickly enter normal working state in the case of Type-C mode failure and Type-A mode normal operation, without the need for manual switching by the user, it can improve the problem of cumbersome operation and wasted time in the existing technology.
[0119] This application can improve the working efficiency of wireless screen sharing devices and save time. Optionally, in one specific embodiment, please refer to [link to specific implementation details]. Figure 5 , Figure 5 Another embodiment of the method provided in this application is shown, specifically including the following steps A1 to A4:
[0120] A1. Detect whether the Type-C interface is connected to the terminal device. If so, proceed to step A2.
[0121] A2. Use Type-C transmission mode to transmit data with the terminal device to obtain media data in DP protocol format.
[0122] Optionally, in one specific embodiment, step A2 may specifically include the following steps A21 to A23:
[0123] A21. Collect the media data in the DP protocol format and convert it into MIPI format data.
[0124] A22. Encode the MIPI format data to obtain the encoding result.
[0125] A23. The encoding result is transmitted to the display device so that the display device can decode and display the media data corresponding to the encoding result.
[0126] In the above implementation, media data is collected from the terminal device, and the media data is encoded by the screen transmitter to obtain the encoding result, and the encoding result is transmitted to the display device.
[0127] A3. Determine whether the target parameter can be obtained according to the media data in the DP protocol format within a preset time. If not, proceed to step A4.
[0128] A4. Switch the transmission mode from the Type-C transmission mode to the Type-A transmission mode to obtain media data in USB 2.0 protocol format.
[0129] Optionally, in one specific embodiment, step A4 may specifically include the following steps A41 to A43:
[0130] A41. Switch the transmission mode from the Type-C transmission mode to the Type-A transmission mode so that the terminal device can encode the media data to obtain media data in USB 2.0 protocol format.
[0131] Optionally, in one specific embodiment, step A41 may specifically include the following steps A411 to A413:
[0132] A411. Determine whether the terminal device has a second application installed. If yes, proceed to step A412; otherwise, proceed to step A413.
[0133] A412. Send a switching command to the terminal device to instruct the terminal device to run the second application and encode the media data through the second application to obtain media data in the USB 2.0 protocol format.
[0134] A413. Send a pop-up command to the display device paired with the wireless screen sharing device to instruct the user to install the second application.
[0135] In the above implementation, the wireless screen sharing device can first determine whether the terminal device has a second application installed. If it does, the wireless screen sharing device sends a switching command to the terminal device, instructing the terminal device to run the second application and then encode and process the media data through the second application. If it does not have the second application installed, a pop-up command is displayed on the display device paired with the wireless screen sharing device to instruct the user to install the second application. Specifically, the terminal device can encode and process the media data by running the second application stored within itself; this method can improve the stability of the encoding and processing.
[0136] A42. Receive media data in the USB 2.0 protocol format sent by the terminal device.
[0137] A43. The media data in the USB 2.0 protocol format is transmitted to the display device so that the display device can decode and display the media data corresponding to the media data in the USB 2.0 protocol format.
[0138] In the above implementation, in Type-A transmission mode, the encoding processing operation of media data is performed by the terminal device. After the terminal device obtains the encoding result, it sends the encoding result to the screen transmitter, which then transmits the encoding result to the display device.
[0139] In the above implementation, when the Type-C interface is connected to the terminal device, the Type-C transmission mode can be used first to transmit data with the terminal device to obtain media data in DP protocol format. Then, it is determined whether the target parameter can be obtained from the DP protocol format media data within a preset time. If it cannot be obtained, it indicates that the wireless screen sharing device cannot currently operate normally in Type-C transmission mode. Therefore, the wireless screen sharing device can use Type-A transmission mode to transmit data with the terminal device to obtain media data in USB 2.0 protocol format corresponding to Type-A transmission mode. This implementation allows the wireless screen sharing device to automatically switch to Type-A transmission mode when it cannot operate normally in Type-C transmission mode, avoiding manual switching by the user, simplifying operation, and saving time.
[0140] Optionally, please see details. Figure 8 In one embodiment, the method provided in this application is applied to a wireless screen sharing device, which includes a Type-C interface, a first data conversion chip, and a processor. The Type-C interface is connected to the processor through the first data conversion chip, and the Type-C interface includes differential signal pins and USB 2.0 data pins. The method includes the following steps B1 to B4:
[0141] B1. Receive media data in DP protocol format sent by the terminal device through the differential signal pin;
[0142] B2. Send the received media data in the DP protocol format to the first data conversion chip;
[0143] B3. The first data conversion chip converts the media data in the DP protocol format into MIPI format data, obtains the target parameters based on the media data in the DP protocol format, and sends the MIPI format data and the target parameters to the processor.
[0144] Optionally, the first data conversion chip is connected to the processor via an ICC bus and a MIPI signal line. The first data conversion chip sends a notification instruction to the processor via the ICC bus. The notification instruction is used to inform the processor whether the first data conversion chip has received media data in the DP protocol format within a preset time period. The first data conversion chip sends MIPI format data via the MIPI signal line.
[0145] B4. When the processor does not receive the MIPI format data within a first preset time, or does not obtain the target parameter within a second preset time, or determines within a third preset time that the first data conversion chip has not received the media data in the DP protocol format, it switches to receiving media data in the USB 2.0 protocol format through the USB 2.0 data pin.
[0146] In this embodiment, the wireless screen sharing device is pre-designed to be compatible with both Type-C and Type-A transmission modes, meaning it supports the transmission of media data in both DP and USB 2.0 formats. Specifically, the device can pre-store a first code, a second code, and a third code. The first code implements the Type-C transmission mode for transmitting DP media data; the second code implements the Type-A transmission mode for transmitting USB 2.0 media data; and the third code switches between the Type-C and Type-A modes. These codes can be stored in memory and executed by the processor to achieve the corresponding functions. The third code may include the transmission mode instruction run_mode. The wireless screen sharing device controls the current data transmission mode by assigning a value to the transmission mode instruction run_mode. For example, when run_mode=1, it can be set to use the Type-C transmission mode for data transmission, and when run_mode=0, it can be set to use the Type-A transmission mode for data transmission. The transmission process is explained in detail below.
[0147] For example, when the Type-C interface of the wireless screen sharing device is plugged into the Type-C interface of a computer, the first data conversion chip in the wireless screen sharing device establishes a communication process with the computer, including a DP protocol handshake and a USB 2.0 protocol handshake. After the DP protocol handshake between the first data conversion chip and the computer is successful, the first data conversion chip sets the value of the screen sharing mode command `run_mode` to 1 and sends the result of `run_mode=1` to the processor. Furthermore, after the DP protocol handshake between the first data conversion chip and the computer is successful, the first data conversion chip receives media data in DP protocol format transmitted by the computer, performs data format conversion on the received DP protocol format media data to obtain MIPI format media data, identifies and obtains target parameters, such as resolution parameters, and sends the MIPI format media data and target parameters to the processor. Because the first data conversion chip needs a certain amount of time to recognize the media data in DP protocol format, the processor will first receive the result of the screen sharing mode instruction (run_mode=1), and then receive the target parameters after a certain period of time. After receiving run_mode=1, MIPI format media data and target parameters, the processor will compress and encode the MIPI format media data according to the target parameters to obtain the encoded data, and send the encoded data to the wireless module. The wireless module will then send the data to the interactive flat panel through the wireless communication network, so that the wireless screen sharing device can work normally in Type-C transmission mode.
[0148] However, if the wireless screen sharing device waits indefinitely for the target parameter, the screen sharing process will be prolonged, resulting in a poor user experience. Therefore, in this embodiment, a timer is started when the processor's operating system boots up. If the target parameter is received within a second preset time, the wireless screen sharing device operates in Type-C transmission mode as described above. Furthermore, the processor generates a notification command and sends it to the second application installed on the computer, preventing the second application from performing tasks such as screenshotting and encoding. This prevents the computer from sending media data in USB 2.0 protocol format to the wireless screen sharing device, thus causing the computer to operate in Type-C transmission mode instead of Type-A transmission mode.
[0149] If the processor does not receive the target parameter at the second preset time, the processor sets the value of the screen sharing mode instruction run_mode to 0 and sends the result run_mode=0 to the second application on the computer. This allows the second application to capture and encode the current media data on the computer, obtain media data in USB 2.0 protocol format, and send the media data in USB 2.0 protocol format to the processor through the USB 2.0 data pin. The processor then sends the received media data in USB 2.0 protocol format to the wireless module, which in turn sends it to the interactive flat panel through the wireless communication network.
[0150] In some embodiments, when the DP protocol handshake between the first data conversion chip and the computer fails, the first data conversion chip sets the value of the screen sharing mode instruction `run_mode` to 0 and sends `run_mode=0` to the processor. Upon receiving `run_mode=0`, the processor sends the result to the second application on the computer, enabling the second application to capture and encode the current media data on the computer, obtain media data in USB 2.0 protocol format, and send the USB 2.0 protocol format media data to the processor via the USB 2.0 data pin. The processor then sends the received USB 2.0 protocol format media data to the wireless module, which in turn sends it to the interactive tablet via the wireless communication network. If the failure to handshake with the computer via the DP protocol is due to a malfunction of the first data conversion chip, it will also be unable to set the value of `run_mode` to 0 and send it to the processor. However, if the processor waits for feedback from the first data conversion chip, the screen sharing process will be prolonged, resulting in a poor user experience. Therefore, in this embodiment, a timer is started when the processor's operating system boots up. If no feedback is received from the first data conversion chip within a third preset time, it is determined that the first data conversion chip has not received media data in DP protocol format. At this time, the processor sets the value of the screen sharing mode instruction run_mode to 0 and sends the result run_mode=0 to the second application on the computer, so that the second application can perform screenshot and encoding processing on the current media data of the computer to obtain media data in USB 2.0 protocol format, and send the media data in USB 2.0 protocol format to the processor through the USB 2.0 data pin. The processor then sends the received media data in USB 2.0 protocol format to the wireless module, and the wireless module then sends it to the interactive flat panel through the wireless communication network.
[0151] In some embodiments, when the DP protocol handshake between the first data conversion chip and the computer is successful, the first data conversion chip sets the value of the screen sharing mode instruction run_mode to 1 and sends the result run_mode=1 to the processor to inform the processor that the DP protocol handshake with the computer is successful. However, if the first data conversion chip fails to convert the received DP protocol format media data into MIPI format data, and the processor waits indefinitely for MIPI format data, the screen sharing process will be prolonged, resulting in a poor user experience. Therefore, in this embodiment, a timer is started when the processor's operating system starts. If MIPI format data is not received within a first preset time, the processor modifies the value of the screen sharing mode instruction run_mode to 0 and sends the result run_mode=0 to the second application on the computer. This allows the second application to capture and encode the current media data on the computer to obtain USB 2.0 protocol format media data, and sends the USB 2.0 protocol format media data to the processor through the USB 2.0 data pin. The processor then sends the received USB 2.0 protocol format media data to the wireless module, which then sends it to the interactive tablet via the wireless communication network.
[0152] Optionally, in one specific embodiment, step B4 may specifically include the following steps B41 to B42:
[0153] B41. When the processor does not receive the MIPI format data within a first preset time, or does not obtain the target parameter within a second preset time, or determines within a third preset time that the first data conversion chip has not received the media data in the DP protocol format, the processor controls the acquisition of the second application from the memory and sends it to the terminal device through the USB 2.0 data pin, so that the second application runs on the terminal device. The second application is used to perform screenshot and encoding processing on the current media data of the terminal device to obtain media data in the USB 2.0 protocol format.
[0154] B42. The processor controls the switching to receive media data in USB 2.0 protocol format sent by the terminal device via the USB 2.0 data pin. In the above embodiment, the Type-C interface receives media data in DP protocol format and sends the DP protocol format media data to the first data conversion chip. The first data conversion chip converts the DP protocol format media data into MIPI format data, and obtains target parameters based on the DP protocol format media data. The first data conversion chip sends the MIPI format data and the target parameters to the processor. When the processor does not receive the MIPI format data within a first preset time, or does not obtain the target parameters within a second preset time, or determines within a third preset time that the first data conversion chip has not received the DP protocol format media data, it switches to receiving media data in USB 2.0 protocol format via the USB 2.0 data pin.
[0155] The above implementation allows the processor of the wireless screen sharing device to automatically switch to the transmission mode of receiving media data in USB 2.0 protocol format when it is unable to process MIPI format data and the target parameters normally. This avoids manual switching by the user, simplifies the operation, and saves time.
[0156] To better implement the above methods, embodiments of this application also provide a data transmission device, such as... Figure 1 The Type-C screen sharing device 3 shown is described in detail below. Figure 8 It may include a Type-C interface 11, a first data conversion chip 51, a processor 12, and a wireless module 14. The Type-C interface 11 includes a first data pin and a second data pin. The first data pin is connected to the processor 12 through the first data conversion chip 51, and the second data pin is connected to the processor 12. The processor 12 is connected to the memory 13 and the wireless module 14, respectively.
[0157] In actual use of the wireless screen sharing device, the following issues may occur: damage to the first data conversion chip 51; damage to the communication path between the processor 12 and the first data conversion chip 51, or damage to the communication module within the processor 12; or the terminal device not supporting the transmission of media data in DP protocol format. These issues may cause the first data conversion chip 51 to fail to receive DP protocol format media data, or other reasons may prevent the processor 12 from receiving the MIPI format data sent by the first data conversion chip 51 within a preset time period, thus rendering the wireless screen sharing function unusable. Furthermore, even if the first data conversion chip 51 receives DP protocol format media data, if it cannot identify the target parameters from the DP protocol format media data, the wireless screen sharing function will also be unusable.
[0158] Based on this, both the first data pin and the second data pin in this embodiment can be used to acquire the current media data of the terminal device (including currently displayed video data, audio data, and control commands, etc.), but the data formats of the acquired media data are different. The first data pin is used to receive media data in DP protocol format from the terminal device, and the second data pin is used to receive media data in USB 2.0 protocol format from the terminal device. The first data conversion chip 51 is used to receive the media data in DP protocol format, convert the received media data in DP protocol format into MIPI format data, obtain target parameters based on the media data in DP protocol format, and send the MIPI format data and target parameters to the processor 12; the processor 12 is used to receive media data in USB 2.0 protocol format through the second data pin when it does not receive the MIPI format data sent by the first data conversion chip within a preset time period.
[0159] It is understood that the wireless screen sharing device in this embodiment has two data transmission links: a first data pin - a first data conversion chip - a processor and a second data pin - a processor. If the processor does not receive MIPI format data within a preset time period, it means that the wireless screen sharing device cannot work normally using the first data pin - the first data conversion chip - the processor data transmission link. At this time, it can switch to work through the second data pin - the processor data transmission link, thereby avoiding the situation where the wireless screen sharing device cannot work due to the abnormality of the first data pin - the first data conversion chip - the processor data transmission link.
[0160] For example, the Type-C interface of the wireless screen sharing device has 24 pins, including two rows of pins with the same function, which support both correct and reverse insertion. The Type-C interface includes two pairs of power pins (A9, B4, B9, A4), four pairs of TX / RX pins (A11 and B2, A10 and B3, A4 and B10, A2 and B11, i.e., the first data pins), two pairs of USB 2.0 data pins, D+ / D- pins (A6 and B7, A7 and B6, i.e., the second data pins), and a CC pin (A5) used for pairing communication when inserted for pairing. 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 operation in USB mode or DP (DisplayPort) mode. When the differential signal transmission pin pair operates in USB mode, it transmits USB 3.0 signals; when it operates in DP mode, it is used as a DP (DisplayPort) interface to transmit media data in DP protocol format. Each USB D+ / D- pin pair supports operation in USB 2.0 mode for transmitting USB 2.0 format data.
[0161] When a user plugs the Type-C interface of the wireless screen sharing device into the Type-C interface of a terminal device (using a computer as an example below), the computer can power on the wireless screen sharing device through the VBUS pin of the Type-C interface, providing operating voltage. After confirming a successful connection, the computer can send an inquiry data packet to the wireless screen sharing device through the CC pin of the Type-C interface. This inquiry data packet can contain information customized by the vendor. Upon receiving this signal, the wireless screen sharing device sends a corresponding response message to the computer through its CC pin. The response message describes the device attributes of the wireless screen sharing device, specifically including the current or supported operating modes, the specific power supply range, and whether the device type is an external storage device.
[0162] The response message sent by the wireless screen sharing device to the computer may include the device's current operating mode as DP transmission mode. Upon receiving the response message, if the computer confirms that the device is in DP transmission mode, it can configure its Type-C interface to operate in DP transmission mode, invoke the DP driver pre-installed on the computer's operating system, and transmit media data in DP protocol format, including audio and video, to the wireless screen sharing device's differential signal transmission pin pair (i.e., the first data pin) via the differential pins of the computer's Type-C interface.
[0163] The differential signal transmission pin of the wireless screen sharing device is connected to the processor 12 through the first data conversion chip 51. After receiving media data in DP protocol format, the first data pin sends the DP protocol format media data to the first data conversion chip 51. The first data conversion chip 51 can convert the video portion of the DP protocol format media data into MIPI format data and the audio portion into I2S format media data. After format conversion by the first data conversion chip 51, these two types of formatted media data can be provided to the processor 12. Optionally, the processor 12 is a hardware processor (such as an ARM processor), and the processor 12 can compress and encode the two types of formatted media data.
[0164] In addition, the first data conversion chip 51 can calculate the target parameters based on the received DP protocol format media data, and send the target parameters together with the converted MIPI format data to the processor. The processor encodes the MIPI format data based on the target parameters.
[0165] The data conversion chip and the processor are physically connected via an Inter-Integrated Circuit (IIC or I2C) bus and a Mobile Industry Processor Interface (MIPI) signal line. The IIC bus is used to transmit control data, such as target parameters, while the MIPI signal line is used to transmit video data, such as MIPI format data. When the processor receives the target parameters transmitted by the IIC bus, it controls the acquisition of video data from the data conversion chip through the MIPI signal line.
[0166] Two pairs of USB D+ / D- pins are directly connected to the processor 12, which can obtain media data in USB 2.0 protocol format from the computer and send the obtained media data in USB 2.0 protocol format directly to the processor 12.
[0167] The processor is configured to switch to data transmission with the computer via USB 2.0 data pins to obtain media data in USB 2.0 protocol format when it fails to receive the MIPI format data within a first preset time, or fails to obtain the target parameter within a second preset time, or determines that the first data conversion chip has not received the DP protocol format media data within a third preset time.
[0168] It is understandable that when the MIPI format data is not received within the first preset time, or the target parameter is not obtained within the second preset time, or it is determined within the third preset time that the first data conversion chip has not received the DP protocol format media data, the wireless screen sharing device cannot work properly to transmit the wireless screen sharing content to the display device. At this time, the processor 12 controls the acquisition of USB 2.0 protocol format media data from the computer through two pairs of USB D+ / D- pins.
[0169] The process is explained in detail below:
[0170] The wireless screen sharing device also includes a memory 13, which can pre-store a second application that can be sent to a computer for execution. When the computer has already started the second application, if the processor of the wireless screen sharing device does not receive the MIPI format data within a first preset time, or does not obtain the target parameters within a second preset time, or determines within a third preset time that the first data conversion chip has not received the DP protocol format media data, it can send a switching command to the computer. After receiving the switching command, the computer automatically runs the second application and performs screenshot processing on the computer's media data to obtain screen capture data. The second application can also encode the screen capture data to obtain USB 2.0 protocol format media data, and send the USB 2.0 protocol format media data to the USB D+ / D- pin of the wireless screen sharing device's Type-C interface through the USB D+ / D- pin of the computer's Type-C interface. After receiving the USB 2.0 protocol format media data, the USB D+ / D- pin of the Type-C interface sends it to the processor. The processor then sends the received USB 2.0 protocol format media data to the wireless module 14. The wireless module 14 can send the USB 2.0 protocol format media data obtained from the terminal device to other network nodes in the wireless communication network (such as...). Figure 1 The interactive flat panel shown is used to display video footage.
[0171] When no second application is installed (such as when the computer is first paired or connected to the wireless screen sharing device, or when the computer has installed and then uninstalled the second application), the user needs to open the corresponding drive of the wireless screen sharing device on the computer to display the contents stored in the wireless screen sharing device's storage space, i.e., the icon corresponding to the program stored in the wireless screen sharing device: such as the icon of the second application. At this time, the user needs to manually double-click or right-click to run the icon of the second application. When the computer receives the double-click or right-click operation on the icon of the second application, it loads the second application stored on the wireless screen sharing device into the computer's memory through the USB 2.0 data transmission pins D+ and D- in the Type-C interface 11 for the computer's processor to execute.
[0172] The second application integrates a screen sharing service program for automatically launching the second application. After the user installs the second application for the first time, the screen sharing service program will run in the background of the computer, so that the second application will be launched automatically when the computer is plugged into the wireless screen sharing device for the second time, without the need for manual operation by the user.
[0173] In some embodiments, when the computer does not have a second application installed, the wireless screen sharing device can send a pop-up command to the interactive flat panel that is paired with it, causing the interactive flat panel to pop up a prompt box to prompt the user to manually open the corresponding drive on the computer and install the second application.
[0174] It should be noted that the ways a computer obtains a second application are not limited to this. For example, a computer can also obtain a second application from other third-party devices or specific websites.
[0175] In this embodiment of the application, before the terminal device runs the second application, the wireless screen sharing device may also perform the following steps: run iptables routing rules to achieve the switching of the screen sharing device network segment.
[0176] When the wireless screen sharing device receives a switching command, the Type-C interface connecting the wireless screen sharing device and the terminal device is virtualized as a wired network card. This wired network card has its own wired network segment, while the wireless module 14 of the wireless screen sharing device has its own wireless network segment. Running iptables routing rules can convert the wired network segment of the virtual wired network card created by the Type-C interface into the wireless network segment of the wireless module 14, thereby realizing the conversion from wired network segment to wireless network segment. This allows the wireless screen sharing device to send the received USB 2.0 protocol format media data to the wireless network through the wireless module, and then send it to the corresponding display node through the wireless network.
[0177] It is understandable that when the wireless screen sharing device transmits data through the second data pin, the transmission path of the media data is: the hardware interface of the wireless screen sharing device (virtually a wired network card) - the processor of the wireless screen sharing device - the wireless module of the wireless screen sharing device - the display node (such as an interactive flat panel).
[0178] In this embodiment, after the processor 12 receives MIPI format data, it needs to perform compression encoding on the MIPI format data. During the encoding process, it needs to obtain target parameters and compress and encode the MIPI format data according to the target parameters. If the target parameters are not received, the processor 12 cannot perform compression encoding. If the processor 12 does not receive the target parameters within a second preset time, it can send a switching command to the computer. After receiving the switching command, the computer will automatically run a second application and perform screenshot processing on the computer's media data to obtain screen capture data. The second application can also encode the screen capture data to obtain media data in USB 2.0 protocol format. The computer can send the media data in USB 2.0 protocol format to the processor 12 of the screen transmitter 3 through the second data pin. After receiving the media data in USB 2.0 protocol format through the second data pin, the processor 12 of the screen transmitter 3 sends it to the wireless module 14. The wireless module 14 can send the media data in USB 2.0 protocol format to other network nodes in the wireless communication network (such as...). Figure 1 The interactive flat panel shown is used to display video footage.
[0179] The wireless screen sharing device provided in this application embodiment can automatically switch to Type-A transmission mode when the Type-C transmission mode cannot be used normally, and quickly enter the normal working state without the need for manual switching by the user, thereby improving the problem of cumbersome operation and wasted time in the prior art.
[0180] Optionally, the first data conversion chip is connected to the processor via an ICC bus and a MIPI signal line. The first data conversion chip sends a notification instruction to the processor via the ICC bus. The notification instruction is used to inform the processor whether the first data conversion chip has received media data in the DP protocol format within a third preset time period.
[0181] Understandably, the first data conversion chip 51 and the processor 12 are physically connected via an integrated circuit bus (IIC or I2C) and a Mobile Industry Processor Interface (MIPI) signal line. The integrated circuit bus is used to transmit control data, such as target parameters, while the MIPI signal line is used to transmit video data, such as MIPI format data. The first data conversion chip 51 can send a notification command to the processor 12 via the integrated circuit bus. This notification command informs the processor 12 whether the first data conversion chip 51 has received media data in DP protocol format within a third preset time period. If not, the processor switches to obtaining media data in USB 2.0 protocol format from the computer via two pairs of USB D+ / D- pins.
[0182] This application embodiment also provides a data transmission device, including a Type-C interface, a first data conversion chip, a processor, a memory, and a wireless module. The Type-C interface includes a first data pin and a second data pin. The first data pin is connected to the processor through the first data conversion chip, and the second data pin is connected to the processor. The processor is connected to the memory and the wireless module respectively.
[0183] The first data pin is used to receive media data in DP protocol format, and the second data pin is used to receive media data in USB 2.0 protocol format.
[0184] The first data conversion chip is used to receive media data in the DP protocol format, convert the received media data in the DP protocol format into MIPI format data, obtain target parameters based on the media data in the DP protocol format, and send the MIPI format data and the target parameters to the processor;
[0185] The processor is configured to receive media data in USB 2.0 protocol format via the second data pin when it does not receive the MIPI format data within a first preset time period, or does not obtain the target parameter within a second preset time period, or determines that the first data conversion chip has not received the DP protocol format media data within a third preset time period.
[0186] The specific implementation methods of the above steps are as described in the above application embodiments, and will not be repeated here.
[0187] Please see details Figure 7 This application also provides a data transmission virtual device for use with a wireless screen sharing device, which can be electrically connected to a terminal device.
[0188] The device includes:
[0189] The startup unit 301 is used to initiate the handshake between the DP protocol and the USB 2.0 protocol and the terminal device when the Type-C interface is connected to the terminal device.
[0190] The media data judgment unit 302 is used to determine whether media data in DP protocol format is received within a preset time when the DP protocol handshake is successful. The media data in DP protocol format is generated by processing the media data currently displayed on the screen of the terminal device based on the DP protocol.
[0191] The first instruction sending unit 303 is used to send a switching instruction to the terminal device when the media data in the DP protocol format is not received. The switching instruction is used to enable the terminal device to perform screenshot and encoding processing on the currently displayed media data.
[0192] The media data receiving unit 304 is used to receive media data in USB 2.0 protocol format sent by the terminal device. The media data in USB 2.0 protocol format is generated by processing the media data after the terminal device has taken a screenshot and encoded it based on the USB 2.0 protocol.
[0193] In one specific embodiment, the device further includes:
[0194] The target parameter determination unit is used to determine whether a target parameter has been obtained within a preset time period when media data in the DP protocol format is received. The target parameter is obtained by identifying and processing the media data in the DP protocol format.
[0195] The second instruction sending unit is used to send a switching instruction to the terminal device when the target parameter is not obtained. The switching instruction is used to enable the terminal device to perform screenshot and encoding processing on the currently displayed media data.
[0196] In one specific embodiment, the device further includes:
[0197] The format conversion unit is used to convert the received media data in the DP protocol format into MIPI format data when the target parameter is received within the preset time period.
[0198] The encoding processing unit is used to encode the MIPI format data to obtain the encoding result;
[0199] An encoding and transmission unit is used to transmit the encoding result to a display device so that the display device can decode and display the media data corresponding to the encoding result.
[0200] In one specific embodiment, the second instruction sending unit may specifically include:
[0201] An application installation subunit is used to determine whether the terminal device has a second application installed when media data in the DP protocol format is not received.
[0202] The switching instruction sending subunit is used to send a switching instruction to the terminal device when the terminal device has the second application installed, so as to instruct the terminal device to run the second application and perform screenshot and encoding processing on the currently displayed media data through the second application;
[0203] The pop-up instruction subunit is used to send a pop-up instruction to the display device paired with the wireless screen sharing device when the terminal device does not have the second application installed, so as to instruct the user to install the second application.
[0204] The specific implementation of the above device is described in the above application embodiments and will not be repeated here.
[0205] This application improves the working efficiency of wireless screen sharing devices and saves time. Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by instructions, or by controlling related hardware with instructions. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0206] To this end, embodiments of this application provide a computer-readable storage medium storing a plurality of instructions that can be loaded by a processor to execute steps in any of the data transmission methods provided in embodiments of this application. For example, the instructions may execute the following steps: detecting whether the Type-C interface is connected to the terminal device; if so, transmitting data with the terminal device using Type-C transmission mode to obtain media data in DP protocol format; determining whether the media data in DP protocol format is received within a preset time; if not, transmitting data with the terminal device using Type-A transmission mode to obtain media data in USB 2.0 protocol format.
[0207] Determine whether the target parameter has been acquired within a preset time period. The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0208] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations of the above embodiments.
[0209] Since the instructions stored in the storage medium can execute the steps of any of the data transmission methods provided in the embodiments of this application, the beneficial effects that any of the data transmission methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.
[0210] The data transmission method, apparatus, and computer-readable storage medium provided in the embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A data transmission method, characterized in that, Applied to a wireless screen sharing device, the wireless screen sharing device includes a Type-C interface and supports DP protocol and USB2.0 protocol communication; The method includes: When the Type-C interface is connected to the terminal device, a handshake is initiated to establish the DP protocol and USB 2.0 protocol with the terminal device; When the DP protocol handshake is successful, it is determined whether media data in DP protocol format has been received within a preset time. The media data in DP protocol format is generated by processing the media data currently displayed on the screen of the terminal device based on the DP protocol. If media data in the DP protocol format is not received, determine whether the terminal device has a second application installed. The second application integrates a screen sharing service program, which is used to automatically run the second application when the wireless screen sharing device is connected to the terminal device. If the terminal device has the second application installed, a switching command is sent to the terminal device to instruct the terminal device to run the second application and to perform screenshot and encoding processing on the currently displayed media data through the second application; The device receives media data in USB 2.0 protocol format sent by the terminal device. The media data in USB 2.0 protocol format is generated by processing the media data after the terminal device has taken a screenshot and encoded it based on the USB 2.0 protocol.
2. The data transmission method according to claim 1, characterized in that, When the DP protocol handshake is successful, it is determined whether media data in DP protocol format has been received within a preset time. The media data in DP protocol format is generated by processing the media data currently displayed on the terminal device's screen based on the DP protocol. The method further includes: If media data in the DP protocol format is received, determine whether the target parameter has been obtained within a preset time period. The target parameter is obtained by identifying and processing the media data in the DP protocol format. If the target parameter is not obtained, a switching command is sent to the terminal device. The switching command is used to enable the terminal device to take a screenshot and encode the currently displayed media data.
3. The method as described in claim 2, characterized in that, After determining whether a target parameter has been obtained within a preset time period upon receiving media data in the DP protocol format, wherein the target parameter is obtained by identifying and processing the media data in the DP protocol format, the method further includes: If the target parameter is received within the preset time period, the received media data in the DP protocol format will be converted into MIPI format data. The MIPI format data is encoded to obtain the encoding result; The encoding result is transmitted to a display device so that the display device can decode and display the media data corresponding to the encoding result.
4. The method as described in claim 3, characterized in that, Also includes: If the terminal device does not have the second application installed, a pop-up command is sent to the display device paired with the wireless screen sharing device to instruct the user to install the second application.
5. A data transmission method, characterized in that, The invention is applied to a wireless screen sharing device, which includes a Type-C interface, a first data conversion chip, and a processor. The Type-C interface is connected to the processor through the first data conversion chip, and the Type-C interface includes differential signal pins and USB 2.0 data pins. The method includes: Media data in DP protocol format sent by the terminal device is received through the differential signal pin; The received media data in the DP protocol format is sent to the first data conversion chip; The first data conversion chip converts the media data in the DP protocol format into MIPI format data, obtains target parameters based on the media data in the DP protocol format, and sends the MIPI format data and the target parameters to the processor. When the processor does not receive the MIPI format data within a first preset time, or does not obtain the target parameter within a second preset time, or determines within a third preset time that the first data conversion chip has not received the media data in the DP protocol format, it switches to receiving media data in the USB 2.0 protocol format through the USB 2.0 data pin. If the wireless screen sharing device does not receive media data in the DP protocol format, it determines whether the terminal device has a second application installed. The second application integrates a screen sharing service program, which is used to automatically run the second application when the wireless screen sharing device is connected to the terminal device. If the terminal device has the second application installed, a switching command is sent to the terminal device to instruct the terminal device to run the second application and perform screenshot and encoding processing on the currently displayed media data through the second application to generate media data in the USB 2.0 protocol format.
6. The data transmission method according to claim 5, characterized in that, The first data conversion chip is connected to the processor via an ICC bus and a MIPI signal line. The first data conversion chip sends a notification instruction to the processor via the ICC bus. The notification instruction is used to inform the processor whether the first data conversion chip has received media data in the DP protocol format within a preset time period. The first data conversion chip sends MIPI format data through the MIPI signal line.
7. The data transmission method according to claim 5 or 6, characterized in that, The wireless screen sharing device also includes a memory, which stores a second application program; When the processor does not receive the MIPI format data within a preset time, or does not obtain the target parameter within a preset time, or determines within a preset time that the first data conversion chip has not received the DP protocol format media data, it controls the switch to receive USB 2.0 protocol format media data through the USB 2.0 data pin, including: When the processor fails to receive the MIPI format data within a first preset time, or fails to obtain the target parameter within a second preset time, or determines within a third preset time that the first data conversion chip has not received the DP protocol format media data, the processor controls the acquisition of the second application from the memory and sends it to the terminal device through the USB 2.0 data pin, so that the second application runs on the terminal device. The second application is used to capture and encode the current media data of the terminal device to obtain media data in USB 2.0 protocol format. The processor control switches to receive media data in the USB 2.0 protocol format sent by the terminal device via the USB 2.0 data pin.
8. A data transmission device, characterized in that, The invention is applied to a wireless screen sharing device, which includes a Type-C interface, a first data conversion chip, a processor, a memory, and a wireless module. The Type-C interface includes a first data pin and a second data pin. The first data pin is connected to the processor through the first data conversion chip, and the second data pin is connected to the processor. The processor is connected to the memory and the wireless module respectively. The first data pin is used to receive media data in DP protocol format sent by the terminal device, and the second data pin is used to receive media data in USB 2.0 protocol format. The first data conversion chip is used to receive media data in the DP protocol format, convert the received media data in the DP protocol format into MIPI format data, obtain target parameters based on the media data in the DP protocol format, and send the MIPI format data and the target parameters to the processor. The processor is used to receive media data in USB 2.0 protocol format through the second data pin when it does not receive the MIPI format data within a first preset time, or does not obtain the target parameter within a second preset time, or determines that the first data conversion chip has not received media data in DP protocol format within a third preset time. If the wireless screen sharing device does not receive media data in the DP protocol format, it determines whether the terminal device has a second application installed. The second application integrates a screen sharing service program, which is used to automatically run the second application when the wireless screen sharing device is connected to the terminal device. If the terminal device has the second application installed, a switching command is sent to the terminal device to instruct the terminal device to run the second application and perform screenshot and encoding processing on the currently displayed media data through the second application to generate media data in the USB 2.0 protocol format.
9. A data transmission device, characterized in that, The system includes a processor and a memory, the memory storing multiple instructions; the processor loads instructions from the memory to perform the steps of the data transfer method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Data transmission device, and data transmission method
CN111316224A
Display equipment and screen projection system
CN111757155A