Control method, device, electronic device and readable storage medium
By detecting the connection mode of the input source device and converting the control data format, it solves the problem of being unable to control the input source device when the external device is wirelessly connected, achieving effective control of the input source device, and improving the user experience and the efficiency of device collaboration.
Patent Information
- Application Number
- CN202110550723.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-19
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2041-05-19
AI Technical Summary
In the existing technology, when an external device is connected to a display wirelessly, it may cause the problem of being unable to effectively control the input source device.
By determining whether the input source device is connected through a wired method, if connected, the received control data is converted into a format that supports the interface type and sent to the input source device through the corresponding interface to control the input source device.
This ensures that external devices can effectively control the input source device when connected to the display through wireless or wired methods, improving user experience and collaboration efficiency between devices.
Smart Images

Figure CN115396520B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminals, and in particular to a control method, device, electronic device and readable storage medium. Background Art
[0002] Monitors are an important device in office and entertainment scenarios. Mobile phones, laptops, tablets and other input source devices can be connected to monitors to transmit images to the monitors for display.
[0003] In the prior art, when an input source device is connected to a display, external devices such as a keyboard and a mouse can be connected to the display to control the external devices connected to the display through the external devices.
[0004] However, when an external device is connected to the display via a wireless method, the external device may not be able to effectively control the input source device. Summary of the invention
[0005] The embodiments of the present application provide a control method, an apparatus, an electronic device, and a readable storage medium, which can solve the problem that when an external device is connected to a display via a wireless method, the external device may not be able to effectively control the input source device.
[0006] In a first aspect, an embodiment of the present application provides a control method, comprising: when it is determined that an input source device is connected to an electronic device via a wired manner, and the electronic device receives control data in a first format, the control data in the first format is converted into control data in a second format, wherein the second format is determined by the electronic device according to the type of interface between the input source device and the electronic device. The control data in the second format is sent to the input source device via the interface between the input source device and the electronic device.
[0007] In the present application, the electronic device may be a display, a smart screen, a projector, a television, a large-screen device, or other electronic device with a display function, and the input source device may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, or other device that can output video data.
[0008] In the first aspect, after determining that the input source device is a wired input source device, control data in a first format is obtained and converted into a control data format supported by an interface connecting the input source device and the electronic device, i.e., control data in a second format, and the control data in the second format is sent to the input source device through the interface to achieve control of the input source device.
[0009] In some implementations, the processing module of the electronic device includes a central processing unit and a display processor, the first communication serial port on the display processor is connected to the central processing unit, and the first video interface on the display processor is connected to an interface connecting an input source device and the electronic device.
[0010] Determining that the input source device is connected to the electronic device via a wired manner includes: the display processor sends a receiving state of the first video interface to the central processor via the first communication serial port, the receiving state including receiving video data or not receiving video data. When the receiving state of the first video interface is receiving video data, the central processor determines that the input source device is connected to the electronic device via a wired manner.
[0011] In this embodiment, when the input source device is connected to the electronic device via a wired connection, video data is sent via the first video interface on the display processor. When the central processor determines that the received video data is from the first video interface, it can be determined that the input source device is connected to the electronic device via a wired connection. In this way, it can be accurately determined whether the input source device is connected to the electronic device via a wired connection, and then it can be determined whether the control signal needs to be format converted to achieve reverse control of the input source device.
[0012] In some implementations, the processing module of the electronic device includes a central processing unit, and the second video interface on the central processing unit receives video data from an input source device.
[0013] Determining that the input source device is connected to the electronic device in a wired manner includes: when the video data received by the second video interface is unencoded video data, the central processor determines that the input source device is connected to the electronic device in a wired manner.
[0014] In this embodiment, when the input source device is connected to the electronic device via a wired connection, the video data sent to the central processor via the second video interface is not encoded. When the central processor determines that the received video data is not encoded video data, it can be determined that the input source device is connected to the electronic device via a wired connection. In this way, it is possible to accurately determine whether the input source device is connected to the electronic device via a wired connection, and then determine whether the control signal needs to be format converted, thereby achieving reverse control of the input source device.
[0015] In some implementations, the processing module of the electronic device includes a central processing unit, which includes at least two video interfaces, the video interfaces are used to receive video data from an input source device, and the electronic device displays the video data from each video interface through different windows.
[0016] Determining that the input source device is connected to the electronic device via a wired manner includes: determining a first window of at least two windows, the first window being an active window. When the video data received by the video interface corresponding to the first window is unencoded video data, the central processing unit determines that the input source device corresponding to the first window is connected to the electronic device via a wired manner.
[0017] In this embodiment, at least two windows are displayed on the electronic device. By determining that the video data received by the video interface corresponding to the active window is unencoded video data, it is determined that the input source device corresponding to the active window is connected to the electronic device via a wired manner, and then it is determined whether the control signal needs to be format converted, thereby achieving reverse control of the input source device.
[0018] In some implementations, the wireless module in the electronic device is connected to the central processor via the second communication serial port.
[0019] The electronic device receives the control data in the first format, including: receiving the control data in the first format through the second communication serial port.
[0020] In some implementations, the wireless control device is in communication with the wireless module. The control data in the first format is generated by the wireless control device in response to a user operation.
[0021] In some implementations, the wireless module is connected to a network for communication. The control data in the first format is control data received by the wireless module from the network.
[0022] In some implementations, when the electronic device supports the OTG protocol, converting the control data in the first format into the control data in the second format includes: a central processing unit converting the control data in the first format into the control data in the second format.
[0023] In some implementations, when the electronic device does not support the OTG protocol, the electronic device includes a conversion chip, and the third communication serial port of the central processing unit is communicatively connected to the conversion chip.
[0024] Converting the control data in the first format into the control data in the second format includes: the central processor sends the control data in the first format to the conversion chip through the third communication serial port. The conversion chip converts the control data in the first format into the control data in the second format.
[0025] In some implementations, the electronic device further includes a speaker, and the video data received by the electronic device further includes audio data. The electronic device plays the audio data through the speaker.
[0026] In this embodiment, by adding a speaker to the electronic device, it is achieved that the corresponding audio data can be played while the video data is displayed, and the user does not need to purchase additional audio playback equipment, thereby improving the user experience.
[0027] In some implementations, the electronic device further includes a microphone. The electronic device sends the audio data collected by the microphone to the input source device via an interface connecting the input source device and the electronic device.
[0028] In this embodiment, by adding a microphone to the electronic device, it is possible to collect audio data for use by the input source device while controlling the input source device. The user does not need to purchase additional audio receiving equipment, thereby improving the user experience.
[0029] In a second aspect, an embodiment of the present application provides a control device, including:
[0030] A conversion module is used to convert the control data in the first format into control data in a second format when it is determined that the input source device is connected to the electronic device via a wired manner and the electronic device receives control data in a first format, wherein the second format is determined by the electronic device based on the type of interface connecting the input source device and the electronic device.
[0031] The sending module is used to send the control data in the second format to the input source device through the interface connecting the input source device and the electronic device.
[0032] In some implementations, the processing module of the electronic device includes a central processing unit and a display processor, the first communication serial port on the display processor is connected to the central processing unit, and the first video interface on the display processor is connected to an interface connecting an input source device and the electronic device.
[0033] The display processor sends the receiving state of the first video interface to the central processor through the first communication serial port, and the receiving state includes receiving video data or not receiving video data. The control device also includes a determination module, which is used to determine that the input source device is connected to the electronic device in a wired manner when the receiving state of the first video interface is receiving video data.
[0034] In some implementations, the processing module of the electronic device includes a central processing unit, and the second video interface on the central processing unit receives video data from an input source device.
[0035] When the video data received by the second video interface is uncoded video data, the determination module is specifically used to determine that the input source device is connected to the electronic device in a wired manner.
[0036] In some implementations, the processing module of the electronic device includes a central processing unit, which includes at least two video interfaces, the video interfaces are used to receive video data from an input source device, and the electronic device displays the video data from each video interface through different windows.
[0037] The determination module is further used to determine a first window among the at least two windows, the first window being an active window. When the video data received by the video interface corresponding to the first window is uncoded video data, it is determined that the input source device corresponding to the first window is connected to the electronic device via a wired manner.
[0038] In some implementations, the wireless module in the electronic device is connected to the central processor via the second communication serial port.
[0039] The control device also includes a receiving module, which is used to receive control data in a first format through the second communication serial port.
[0040] In some implementations, the wireless control device is in communication with the wireless module. The control data in the first format is generated by the wireless control device in response to a user operation.
[0041] In some implementations, the wireless module is connected to a network for communication. The control data in the first format is control data received by the wireless module from the network.
[0042] In some implementations, when the electronic device supports the OTG protocol, the conversion module is specifically configured to convert the control data in the first format into the control data in the second format through the central processing unit.
[0043] In some implementations, when the electronic device does not support the OTG protocol, the electronic device includes a conversion chip, and the third communication serial port of the central processing unit is communicatively connected to the conversion chip.
[0044] The conversion module is specifically used to send the control data in the first format to the conversion chip through the third communication serial port, and convert the control data in the first format into the control data in the second format through the conversion chip.
[0045] In some implementations, the electronic device further includes a speaker, and the video data received by the electronic device further includes audio data. The control device further includes a playing module for playing the audio data through the speaker.
[0046] In some implementations, the electronic device further includes a microphone. The control device further includes a sound receiving module, which is used to send the audio data collected by the microphone to the input source device through an interface connecting the input source device and the electronic device.
[0047] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method provided in the first aspect when executing the computer program.
[0048] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the method provided in the first aspect is implemented.
[0049] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on a terminal device, enables the terminal device to execute the method provided in the first aspect.
[0050] In a sixth aspect, an embodiment of the present application provides a chip system, the chip system comprising a memory and a processor, the processor executing a computer program stored in the memory to implement the method provided in the first aspect.
[0051] In the seventh aspect, an embodiment of the present application provides a chip system, which includes a processor, the processor is coupled to the computer-readable storage medium provided in the fourth aspect, and the processor executes a computer program stored in the computer-readable storage medium to implement the method provided in the first aspect.
[0052] It can be understood that the beneficial effects of the second to seventh aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 A schematic diagram of an application scenario of the control method provided in an embodiment of the present application;
[0054] Figure 2 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0055] Figure 3 A schematic diagram of the software structure of an electronic device provided in an embodiment of the present application;
[0056] Figure 4 A schematic flow chart of a control method provided in an embodiment of the present application;
[0057] Figure 5 A schematic diagram of the structure of an electronic device for applying a control method provided in an embodiment of the present application;
[0058] Figure 6 A schematic diagram of the structure of an electronic device for another application control method provided in an embodiment of the present application;
[0059] Figure 7A schematic diagram of an interface of an electronic device when a control method provided in an embodiment of the present application is applied;
[0060] Figure 8 A schematic diagram of a scenario when another control method provided in an embodiment of the present application is applied;
[0061] Fig. 9 A schematic diagram of a scenario when another control method provided in an embodiment of the present application is applied;
[0062] Fig.10 A data flow diagram of a control method application provided in an embodiment of the present application;
[0063] Fig.11 A data flow diagram of another control method application provided in an embodiment of the present application;
[0064] Fig.12 A schematic diagram of a scenario when another control method provided in an embodiment of the present application is applied;
[0065] Fig.13 A structural block diagram of a control device provided in an embodiment of the present application;
[0066] Fig.14 A structural block diagram of another control device provided in an embodiment of the present application;
[0067] Fig.15 A structural block diagram of another control device provided in an embodiment of the present application;
[0068] Fig.16 A structural block diagram of another control device provided in an embodiment of the present application;
[0069] Fig.17 A structural block diagram of another control device provided in an embodiment of the present application;
[0070] Fig.18 A schematic diagram of the structure of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0071] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0072] It should be understood that the term “and / or” used in the specification and appended claims of this application refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0073] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting" depending on the context.
[0074] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0075] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0076] Figure 1 An application scenario of a control method is shown.
[0077] refer to Figure 1 , including wireless external devices, such as a Bluetooth mouse 11, a Bluetooth keyboard 12, etc. Wireless input source devices, such as a smart phone 13 or a tablet computer (not shown), etc. And wired input source devices, such as a laptop computer 14 or a desktop host (not shown), etc. The wireless external device is connected to the electronic device 200 through Bluetooth, the wired input source device can be connected to the electronic device 200 through a Universal Serial Bus Type-c (Type-c), and the wireless input source device can be connected to the electronic device 200 through a wireless network (Wireless Fidelity, Wi-Fi).
[0078] The electronic device 200 may be a display with a wireless communication module. When a wired input source device or a wireless input source device is connected to the electronic device 200, the electronic device 200 may display the screen of the input source device connected thereto. At the same time, the electronic device 200 may also receive control data from a wireless external device and forward the control data to the input source device to control the input source device.
[0079] However, when the wireless external device and the electronic device 200 transmit control data, the data is transmitted through a universal asynchronous receiver / transmitter (UART) or a two-way two-wire synchronous serial (Inter-Integrated Circuit, I2C) bus or other serial ports. For input sources connected by wire, there may be a situation where the interface of the wired input source does not match the interface for transmitting control data, which results in the control data being unable to be transmitted to the wired input source, that is, the wired input source device cannot be controlled by the wireless external device.
[0080] To this end, the present application provides a control method, including: after determining that an input source device is connected to an electronic device via a wired manner, when control data in a first format is obtained, converting the control data in the first format into control data in a second format, the second format being a control data format supported by an interface connecting the input source device and the electronic device, and then sending the control data in the second format to the input source device via the interface of the electronic device connected to the input source device.
[0081] In the present application, after determining that the input source device is a wired input source device, control data in a first format from a wireless external device is intercepted and converted into a control data format supported by an interface connecting the input source device and the electronic device, and the control data is sent to the input source device through the interface to achieve control of the input source device.
[0082] Figure 2The schematic diagram of the structure of an electronic device is shown. The electronic device 200 may include a processor 210, a display screen 220, an interface module 230, a button 240, a camera 250, an antenna, a wireless module 260, an audio module 270, a sensor module 280, an indicator 290, an internal memory 291, etc. Among them, the interface module 230 may include a display port (DP) 230A, a Type-c interface 230B, a universal serial bus type A (USB) interface 230C, a high definition multimedia interface 230D (HDMI), a digital video interface 230E (DVI), and a video graphics array (VGA) interface 230F. The audio module 270 may include a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, etc. The sensor module 280 may include a pressure sensor 280A, a magnetic sensor 280B, a distance sensor 280C, a proximity light sensor 280D, a fingerprint sensor 280E, a touch sensor 280F, an ambient light sensor 280G, and the like.
[0083] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 200. In other embodiments of the present application, the electronic device 200 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0084] For example, when the electronic device 200 is a display, it may include all the components shown in the figure, or may include only some of the components shown in the figure.
[0085] The processor 210 may include one or more processing units, for example, the processor 210 may include one or more of an application processor (AP), a system on chip (SOC), a display processor (scaler), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.
[0086] In one implementation, the processor 210 may include a central processing unit (for example, the central processing unit may be a SOC) and a display processor (for example, the display processor may be a scaler), and the central processing unit and the display processor are independent of each other and communicate through a serial port.
[0087] In another implementation, the display processor may be integrated into the central processing unit, that is, the SOC has the function of a scaler, and in this case the processor 210 only includes the central processing unit.
[0088] The processor 210 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory may store instructions or data that the processor 210 has just used or cyclically used. If the processor 210 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 210, and thus improves the efficiency of the system.
[0089] In some embodiments, the processor 210 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0090] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 210 may include multiple groups of I2C buses. The processor 210 may be coupled to the touch sensor 280F, the camera 250, etc. through different I2C bus interfaces. For example, the processor 210 may be coupled to the touch sensor 280F through the I2C interface, so that the processor 210 communicates with the touch sensor 280F through the I2C bus interface, thereby realizing the touch function of the electronic device 200.
[0091] The I2S interface can be used for audio communication. In some embodiments, the processor 210 can include multiple groups of I2S buses. The processor 210 can be coupled to the audio module 270 via the I2S bus to achieve communication between the processor 210 and the audio module 270. In some embodiments, the audio module 270 can transmit audio signals to the wireless module 260 via the I2S interface.
[0092] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 270 and the wireless module 260 can be coupled via a PCM bus interface.
[0093] In some embodiments, the audio module 270 may also transmit audio signals to the wireless communication module 260 via a PCM interface. Both the I2S interface and the PCM interface may be used for audio communication.
[0094] The UART interface is a universal serial data bus used for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
[0095] In some embodiments, the UART interface is generally used to connect the processor 210 and the wireless module 260. For example, the processor 210 communicates with the Bluetooth module in the wireless module 260 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 270 can transmit audio signals to the wireless module 260 through the UART interface to implement the function of playing music through a Bluetooth headset.
[0096] The MIPI interface can be used to connect the processor 210 with peripheral devices such as the display screen 220 and the camera 250. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), and the like.
[0097] In some embodiments, the processor 210 and the camera 250 communicate via a CSI interface to implement the shooting function of the electronic device 200. The processor 210 and the display screen 220 communicate via a DSI interface to implement the display function of the electronic device 200.
[0098] The GPIO interface can be configured by software. The GPIO interface can be configured as control data or as data signal.
[0099] In some embodiments, the GPIO interface can be used to connect the processor 210 with the camera 250, the display 220, the wireless module 260, the audio module 270, the sensor module 280, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0100] The interface module 230 is a module for connecting to the input source device and the external device. Among them, the Type-c interface can be used as a DP interface, a USB interface and a charging interface at the same time. The charging interface is connected to the power management module and can be used to charge the input source device. The DP interface and the HDMI interface can transmit audio while transmitting images.
[0101] It should be understood that the interface connection relationship between the modules illustrated in the embodiment of the present application is merely a schematic illustration and does not constitute a structural limitation on the electronic device 200 .
[0102] In other embodiments of the present application, the electronic device 200 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0103] The wireless function of the electronic device 200 may be implemented through the antenna and the wireless module 260 .
[0104] The antenna is used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 200 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antenna. For example, the antenna can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0105] The wireless communication module 260 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 200. The wireless module 260 can be one or more devices integrating at least one communication processing module. The wireless module 260 receives electromagnetic waves via an antenna, modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 210. The wireless module 260 can also receive the signal to be sent from the processor 210, modulate the frequency, amplify it, and convert it into electromagnetic waves for radiation through the antenna.
[0106] In some embodiments, the antenna is coupled to the wireless communication module 260 so that the electronic device 200 can communicate with a network and other devices via wireless communication technology. The wireless communication technology may include BT, WLAN, NFC and / or IR technology.
[0107] The electronic device 200 can realize the display function through the scaler, the display screen 220, and the application processor. The scaler can be an independent chip or integrated in the processor 210. For example, when the processor 210 is a SOC, the SOC can be connected to the scaler through the HDMI interface and the UART interface, and the scaler is connected to the display screen 220 to realize the display function. Alternatively, the SOC can also integrate the function of the scaler, and the SOC is directly connected to the display screen 220 to realize the display function.
[0108] The display screen 220 is used to display images, videos, etc. For example, the teaching video and the user action screen video in the embodiment of the present application, the display screen 220 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light emitting diode (QLED), etc. In some embodiments, the electronic device 200 may include 1 or N display screens 220, where N is a positive integer greater than 1.
[0109] The internal memory 291 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 210 executes various functional applications and data processing of the electronic device 200 by running the instructions stored in the internal memory 291. The internal memory 291 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.). The data storage area can store data created during the use of the electronic device 200 (such as audio data, video data, etc.).
[0110] In addition, the internal memory 291 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0111] The electronic device 200 can implement audio functions through the audio module 270, the speaker 270A, the receiver 270B, the microphone 270C, the headphone interface 270D, and the application processor.
[0112] The audio module 270 is used to convert digital audio signals into analog audio signals for output, and is also used to convert analog audio inputs into digital audio signals. The audio module 270 can also be used to encode and decode audio signals. In some embodiments, the audio module 270 can be arranged in the processor 210, or some functional modules of the audio module 270 can be arranged in the processor 210.
[0113] The speaker 270A, also called a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 200 can listen to music or listen to hands-free calls through the speaker 270A. For example, the speaker can play the comparison analysis results provided in the embodiment of the present application.
[0114] The receiver 270B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 200 receives a call or voice message, the voice can be received by placing the receiver 270B close to the human ear.
[0115] Microphone 270C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by approaching the microphone 270C with his mouth to input the sound signal into the microphone 270C. The electronic device 200 can be provided with at least one microphone 270C.
[0116] In other embodiments, the electronic device 200 may be provided with two microphones 270C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 200 may also be provided with three, four or more microphones 270C to realize collecting sound signals and noise reduction. Or the sound source may be identified to realize directional recording function, etc.
[0117] The earphone interface 270D is used to connect a wired earphone and can be a USB interface 230 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0118] The pressure sensor 280A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 280A can be set on the display screen 220. There are many types of pressure sensors 280A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 280A, the capacitance between the electrodes changes. The electronic device 200 determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the display screen 220, the electronic device 200 detects the intensity of the touch operation based on the pressure sensor 280A. The electronic device 200 can also calculate the position of the touch based on the detection signal of the pressure sensor 280A.
[0119] In some embodiments, touch operations acting on the same touch position but with different touch operation strengths may correspond to different operation instructions. For example, when a touch operation with a touch operation strength less than a first pressure threshold acts on a short message application icon, an instruction to view a short message is executed. When a touch operation with a touch operation strength greater than or equal to the first pressure threshold acts on a short message application icon, an instruction to create a new short message is executed.
[0120] The magnetic sensor 280B includes a Hall sensor, and the electronic device 200 can use the magnetic sensor 280B to detect the opening and closing state of the magnetic peripheral device.
[0121] In some embodiments, when the electronic device 200 is equipped with a protective leather case, the electronic device 200 can detect the opening and closing of the protective leather case according to the magnetic sensor 280B, and then set features such as automatic unlocking when the leather case is opened according to the detected opening and closing state of the leather case.
[0122] The distance sensor 280C is used to measure the distance. The electronic device 200 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 200 can use the distance sensor 280F to measure the distance to achieve fast focusing.
[0123] The proximity light sensor 280D may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 200 emits infrared light outward through the light emitting diode. The electronic device 200 uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 200. When insufficient reflected light is detected, the electronic device 200 can determine that there is no object near the electronic device 200. The electronic device 200 can use the proximity light sensor 280D to detect whether the user is too close to the electronic device 200, etc.
[0124] The ambient light sensor 280G is used to sense the brightness of the ambient light. The electronic device 200 can adaptively adjust the brightness of the display screen 220 according to the sensed brightness of the ambient light. The ambient light sensor 280G can also be used to automatically adjust the white balance when taking pictures.
[0125] The fingerprint sensor 280E is used to collect fingerprints. The electronic device 200 can use the collected fingerprint characteristics to implement fingerprint unlocking and other functions.
[0126] The touch sensor 280F is also called a "touch panel". The touch sensor 280F can be arranged on the display screen 220, and the touch sensor 280F and the display screen 220 form a touch screen, also called a "touch screen". The touch sensor 280F is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 220. In other embodiments, the touch sensor 28020 can also be arranged on the surface of the electronic device 200, which is different from the position of the display screen 220.
[0127] The key 240 includes a power key, a volume key, etc. The key 290 can be a mechanical key or a touch key. The electronic device 200 can receive key input and generate key signal input related to user settings and function control of the electronic device 200.
[0128] The indicator 290 may be an indicator light, for example, a light-emitting diode (LED) light for indicating a power-on status, an LED light for indicating a device access status, and the like.
[0129] Figure 3 Schematic diagram of the software structure of the electronic device of the embodiment of the present application. The operating system in the electronic device may be an Android system, a Linux system, or a Harmony OS system, etc. Here, the operating system of the electronic device is taken as an example for explanation.
[0130] In some embodiments, the Hongmeng system can be divided into four layers, including the kernel layer, the system service layer, the framework layer, and the application layer, and the layers communicate with each other through software interfaces.
[0131] like Figure 3 As shown in the figure, the kernel layer includes the kernel abstract layer (KAL) and the driver subsystem. KAL includes multiple kernels, such as the Linux kernel of the Linux system and the LiteOS kernel of the lightweight IoT system. The driver subsystem can include the hardware driver framework (HDF). The hardware driver framework can provide unified peripheral access capabilities and a driver development and management framework. The kernel layer of multiple kernels can select the corresponding kernel for processing according to the needs of the system.
[0132] The system service layer is the core capability set of the Hongmeng system. The system service layer provides services to applications through the framework layer. This layer may include:
[0133] System basic capability subsystem set: provides basic capabilities for the operation, scheduling, migration and other operations of distributed applications on multiple devices of Hongmeng system. It may include distributed soft bus, distributed data management, distributed task scheduling, Ark multi-language runtime, public basic library, multi-mode input, graphics, security, artificial intelligence (AI), user program framework and other subsystems.
[0134] Among them, the Ark multi-language runtime provides C or C++ or JavaScript (JS) multi-language runtime and basic system class libraries, and can also provide a runtime for Java programs statically compiled using the Ark compiler (that is, the part developed using the Java language in the application or framework layer).
[0135] Basic software service subsystem set: Provides public and general software services for Hongmeng system, including event notification, telephone, multimedia, Design For X (DFX), MSDP&DV and other subsystems.
[0136] Enhanced software service subsystem set: Provides differentiated capability-enhanced software services for different devices for the Hongmeng system. It may include smart screen proprietary business, wearable proprietary business, and Internet of Things (IoT) proprietary business subsystems.
[0137] Hardware service subsystem set: Provides hardware services for Hongmeng system. It may include location services, biometric recognition, wearable proprietary hardware services, IoT proprietary hardware services and other subsystems.
[0138] The framework layer provides multi-language user program frameworks and capability frameworks in Java, C, C++, JS, and other languages for Hongmeng system application development, two user interface (UI) frameworks (including the JavaUI framework for Java language and the JS UI framework for JS language), and multi-language framework application programming interfaces (APIs) open to various software and hardware services. Depending on the degree of componentization of the system, the APIs supported by Hongmeng system devices will also vary.
[0139] The application layer includes system applications and third-party non-system applications. System applications may include applications installed by default on electronic devices such as the desktop, control bar, settings, and phone. Extended applications can be non-essential applications developed and designed by the manufacturer of the electronic device, such as electronic device managers, device migration, notes, weather, and other applications. Third-party non-system applications can be developed by other manufacturers, but can run applications in the Hongmeng system, such as games, navigation, social or shopping applications.
[0140] The applications of the Hongmeng system are composed of one or more meta-programs (Feature Ability, FA) or meta-services (Particle Ability, PA). Among them, FA has a UI interface and provides the ability to interact with users. PA has no UI interface, provides the ability to run tasks in the background and a unified data access abstraction. PA mainly provides support for FA, such as providing computing power as a background service, or providing data access capabilities as a data warehouse. Applications developed based on FA or PA can implement specific business functions, support cross-device scheduling and distribution, and provide users with a consistent and efficient application experience.
[0141] Multiple electronic devices running the Hongmeng system can achieve hardware mutual assistance and resource sharing through distributed soft bus, distributed device virtualization, distributed data management and distributed task scheduling.
[0142] Figure 4 A schematic flow chart of the control method provided in the present application is shown. As an example but not a limitation, the control method can be applied to the above-mentioned electronic device 200.
[0143] S301, the electronic device determines whether the input source device is connected via a wired manner, if so, execute S302, otherwise end the process.
[0144] In some implementations, when the input source device is connected to the electronic device via a wired connection, it is necessary to simultaneously connect the video data interface and the control data transmission interface. As an example, the input source device can be connected to the electronic device via a reusable interface, for example, it can be connected to the electronic device via a Type-c interface, and the Type-c interface can use the DP Alt Mode to implement the function of the DP interface using the send / receive data pins therein for transmitting video data. The function of the USB2.0 interface can also be implemented through two USB2.0 data pins for transmitting control data.
[0145] As an example, in the Type-c interface, the data pins include the USB2.0 positive pin (D+), the USB2.0 negative pin (D-), the first transmission positive pin (TX1+), the first transmission negative pin (TX1-), the second transmission positive pin (TX2+), the second transmission negative pin (TX2-), the first reception positive pin (RX1+), the first reception negative pin (RX1-), the second reception positive pin (RX2+) and the second reception negative pin (RX2-). When transmitting data, the data pins are divided into five groups of data pins according to reception, transmission, and positive and negative poles. For example, D+ and D- are a group of data pins, TX1+ and RX1- are a group of data pins, RX1+ and TX1- are a group of data pins, TX2+ and RX2- are a group of data pins, and RX2+ and TX2- are a group of data pins. Each group of data pins can be used to receive and send data.
[0146] As an example, USB2.0 data signals (i.e., control data in this application) can be transmitted through D+ and D-. USB3.0 data signals can be transmitted through TX1+, RX1- and RX1+, TX1-, and two DP signals (DP Main Lane 1 and DP Main Lane 0) can be transmitted through TX2+, RX2- and RX2+, TX2- respectively.
[0147] Alternatively, two DP signals (DP Main Lane 2 and DP Main Lane 3) can be transmitted through TX1+, RX1- and RX1+, TX1-, respectively, and two DP signals (DP Main Lane 1 and DP Main Lane 0) can be transmitted through TX2+, RX2- and RX2+, TX2-, respectively. Among them, if the PD controller detects through CC1 and CC2 that the Type-c pins need to be flipped, two DP signals (DP Main Lane 1 and DP Main Lane 0) can be transmitted through TX1+, RX1- and RX1+, TX1-, respectively, and two DP signals (DP Main Lane 2 and DP Main Lane 3) can be transmitted through TX2+, RX2- and RX2+, TX2-, respectively.
[0148] Among them, since the Type-c interface does not distinguish between positive and negative, the CC1 pin and CC2 pin can be used to detect whether the data pin needs to be flipped. When the CC1 pin and CC2 pin detect that the type-c interface (sub-port) connected to the data line matches the type-c interface (female port) of the electronic device, there is no need to flip the pins, and the above pins can be used to transmit DP signals, USB2.0 data or USB3.0 data signals. If the CC1 pin and CC2 pin detect that the type-c interface connected to the data line does not match the type-c interface of the electronic device, the Type-c pin needs to be flipped, and the corresponding pins after the flip are used to transmit DP signals, USB2.0 data or USB3.0 data signals.
[0149] It should be noted that when the DP signal is transmitted through the above pins, the audio signal can also be transmitted through the sideband use (Sideband Use, SBU) 1 and SBU2 to achieve simultaneous transmission of audio and video.
[0150] Alternatively, the input source device may also be connected to the electronic device through a video transmission interface and a control data transmission interface respectively. For example, the input source device may be connected to the electronic device through a video interface such as a DP interface / HDMI interface / DVI interface / VGA interface to realize transmission of video data. At the same time, the input source device may also be connected to the electronic device through a USB interface to realize transmission of control data.
[0151] Figure 5 A structural schematic diagram of an electronic device to which the control method provided by the present application can be applied is shown.
[0152] refer to Figure 2 and Figure 5 , in this embodiment, Figure 5 The processor 210 of the electronic device 200 shown includes a central processing unit (for example, a SOC) and a display processor (for example, a Scaler) that are independent of each other. The SOC and the Scaler transmit video data via a video transmission interface, and the video transmission interface may include an HDMI interface, a DP interface, or an embedded video interface (Embedded DisplayPort, eDP), etc. The SOC and the Scaler may also transmit control data via a serial port, and the serial port may include a UART interface or an I2C interface, etc. The Bluetooth mouse 11 is connected to the electronic device 200 via Bluetooth, the smart phone 13 is connected to the electronic device 200 via Wi-Fi, and the laptop 14 is connected to the electronic device 200 via a Type-c interface.
[0153] In this embodiment, the Scaler can display one channel of video data. When the Scaler displays video data from the SOC, the input source device is determined to be a wireless input source device. When the Scaler displays video data received by the Scaler, the input source device is determined to be a wired input source device.
[0154] As an example, refer to Figure 5 , when the Scaler responds to the control data transmitted by the UART3 interface, receives the video data from the smartphone sent by the SOC through the HDMI interface, and sends the processed video data to the display screen through the eDP for display, it can be determined that the input source is connected to the electronic device wirelessly. When the DP interface of the Scaler receives the video data from the laptop 14, the Scaler negotiates and shakes hands with the input source device through the DP protocol. After the negotiation and handshake are successful, the video data received by the DP interface is sent to the display screen through the eDP interface for display. In this case, it can be determined that the input source is connected to the electronic device by wire.
[0155] It should be noted that, in this embodiment, the DP interface can also be other data interfaces, such as HDMI, DVI, VGA, etc., and the interface type is not limited. Similarly, the HDMI interface can also be other data interfaces, such as DP, DVI, VGA, etc.
[0156] Figure 6 A structural schematic diagram of an electronic device to which the control method provided by the present application can be applied is shown.
[0157] refer to Figure 2 and Figure 6 , in this embodiment, Figure 6 The processor 210 of the electronic device 200 shown includes a central processing unit (SOC), and the central processing unit integrates the function of a display processor (Scaler). The Bluetooth mouse 11 is connected to the electronic device 200 via Bluetooth, the smart phone 13 is connected to the electronic device 200 via Wi-Fi, and the laptop computer 14 is connected to the electronic device 200 via a Type-c interface.
[0158] In this embodiment, the electronic device may display only one channel of video data, or may display at least two channels of video data on the screen simultaneously.
[0159] When the electronic device displays only one channel of video data, the source of the video data can be obtained through the SOC. When the video data comes from the input interface connected to the wireless module, the input source device is determined to be a wireless input source device. Among them, the wireless module can receive video data from the wireless input source device through wireless transmission protocols such as Wi-Fi, Bluetooth, NFC, etc. After receiving the video data, the wireless module sends the video data to the SOC through the input interface connected to the wireless module and the SOC. The input interface connected to the wireless module and the SOC may include a secure digital input and output (Secure Digital Input and Output Card, SDIO) interface, a high-speed serial computer expansion bus standard (Peripheral Component Interconnect Express, PCIE) interface, or Wi-Fi accessed through a USB interface, etc.
[0160] When the video data comes from a wired interface (such as a DP interface, an HDMI interface, a DVI interface, a VGA interface, etc.), it can be determined that the input source is connected to the electronic device in a wired manner.
[0161] In some implementations, when video data is input through the SDIO interface, the video data received by the SOC is an encoded video (for example, encoded in a format such as H.264 or H.265). When video data is input through a wired interface, the video data received by the SOC is unencoded raw data. When the SOC receives encoded video data, it can be determined that the video data comes from the SDIO interface, that is, the input source device is connected to the electronic device wirelessly. When the SOC receives unencoded video data, it can be determined that the video data comes from the wired interface, that is, the input source device is connected to the electronic device wirelessly.
[0162] When an electronic device displays at least two channels of video data on the screen simultaneously, each channel of video data may correspond to a window. In this case, when the electronic device determines whether the input source device is connected via a wired manner, it needs to determine whether the input source device corresponding to the active window is connected via a wired manner.
[0163] Figure 7 A schematic diagram showing two channels of video data being displayed on the screen simultaneously is shown. Figure 6 , wherein two windows are displayed on the electronic device 200, the window 1 2001 displays the interface from the smart phone 13, and the window 2 2002 displays the interface from the notebook computer 14. The mouse pointer 2003 is the pointer corresponding to the Bluetooth mouse 11.
[0164] refer to Figure 7, when the mouse pointer is within the range of window one, or when the mouse is clicked on the interface corresponding to window one, it can be determined that window one is the activated window, and the SOC needs to determine whether the video data displayed in window one is encoded to obtain the access method of the input source device corresponding to window one. Since in this embodiment, window one displays an interface from a smart phone, the video data displayed by window one is encoded, that is to say, the input source device corresponding to window one is a wireless input source device. After determining that the input source device corresponding to window one is a wireless input source device, the SOC can create an attribute identifier of window one through the window manager, marking that window one corresponds to a wireless input source device. In subsequent operations, there is no need to judge window one again, and it is only necessary to read the attribute identifier of window one to determine that window one corresponds to a wireless input source device.
[0165] When the mouse pointer is within the range of Window 2, or when the interface corresponding to Window 2 is clicked by the mouse, Window 2 can be determined to be the activated window, and the SOC needs to determine whether the video data displayed in Window 2 has been encoded to obtain the access method of the input source device corresponding to Window 2. Since Window 2 in this embodiment displays an interface from a laptop computer, the video data displayed by Window 2 is not encoded, that is, the input source device corresponding to Window 2 is a wired input source device. After determining that the input source device corresponding to Window 2 is a wired input source device, the SOC can create an attribute identifier of Window 2 through the window manager, marking that Window 2 corresponds to a wired input source device. In subsequent operations, there is no need to judge Window 2 again, and it is only necessary to read the attribute identifier of Window 2 to determine that Window 2 corresponds to a wired input source device.
[0166] S302: Whether control data in the first format is received, if so, execute S303, otherwise, end the process.
[0167] In some embodiments, reference Figure 1 , Figure 5 and Figure 6 In the scenario shown in , an external control device (such as a Bluetooth mouse 11, a Bluetooth keyboard 12, etc.) is connected to the electronic device via wireless. In this scenario, when the external control device is connected to the electronic device via wireless, the external device can respond to user operations and send control data to the wireless module of the electronic device 200. The wireless module packages the control data into control data in a first format according to the serial port format used by the SOC. The SOC receives the control data in the first format forwarded by the wireless module from the wireless external device via the serial port. For example, Figure 5 or Figure 6 In the embodiment, the Bluetooth (BT) module in the wireless module communicates with the SOC via the UART serial port. However, the serial port format of the wireless module and the SOC is not limited to this, and can also be I2C or USB2.0, etc.
[0168] Figure 8 Another application scenario of the control method is shown, which includes two electronic devices 200, each of which displays an interface of an input source device, and the two electronic devices 200 can communicate with each other through a wireless module (such as Bluetooth, Wi-Fi or NFC, etc.). The external device is a Bluetooth mouse 11, the electronic device 200 connected to the Bluetooth mouse 11 is a first electronic device, and the electronic device 200 not connected to the Bluetooth mouse 11 is a second electronic device.
[0169] In this embodiment, the first electronic device is connected to the wireless input source device (smartphone 13) via Wi-Fi, and displays the interface corresponding to the smart phone 13. The second electronic device is connected to the laptop computer 14 via the Type-c interface, and displays the interface corresponding to the laptop computer 14. When the laptop computer 14 corresponding to the second electronic device is controlled by the Bluetooth mouse connected to the first electronic device, the first electronic device can send the control data received from the wireless control device (Bluetooth mouse 11) to the second electronic device through the wireless module. After the second electronic device receives the control data from the wireless control device through the wireless module, it packages the control data into control data in the first format according to the serial port used by the SOC. The SOC receives the control data in the first format from the wireless external device forwarded by the wireless module through the serial port.
[0170] Fig. 9 Another application scenario of the control method is shown, which includes an electronic device 200, the electronic device 200 is connected to a smart phone 13 via Bluetooth or Wi-Fi communication, and the electronic device 200 is connected to a laptop computer 14 via a Type-c interface. An application simulating a wireless control device is running in the smart phone 13.
[0171] In this implementation, the smart phone 13 can simulate a wireless control device. When the smart phone 13 generates control data in response to user operations, the smart phone 13 sends the control data to the wireless module of the electronic device. After the electronic device receives the control data from the smart phone 13 through the wireless module, it packages the control data into control data in the first format according to the serial port used by the SOC. The SOC receives the control data in the first format forwarded by the wireless module from the smart phone 13 through the serial port.
[0172] above Figure 1 , Figure 5 , Figure 6 , Figure 8 as well as Fig. 9The implementation method is only an exemplary description of an electronic device receiving control data in a first format. In actual applications, there may be more ways to receive control data in a first format. For example, you can access the network via Wi-Fi and receive control data in the first format from the network, etc., which is not limited here.
[0173] S303: Convert the control data in the first format into control data in the second format through a format conversion module.
[0174] S304: Send the control data in the second format to the input source device through a data interface corresponding to the control data in the second format.
[0175] In some implementations, since the communication method between the wireless module and the processor is a serial port, the control data in the first format may be a data format corresponding to the serial port. For example, when the wireless module and the processor communicate via UART, the wireless module may package the control data into a data format corresponding to the UART, i.e., the control data in the first format, according to the UART communication protocol after receiving the control data from the wireless control device.
[0176] In this embodiment, the control data may be control data in a human interface device (HID) format corresponding to the keyboard and / or mouse. The control data received by the wireless module via Bluetooth is control data packaged via the Bluetooth protocol. The wireless module may package the control data packaged via the Bluetooth protocol again via the UART communication protocol to generate control data in the first format, and then transmit the control data to the wireless module via the Bluetooth protocol. Figure 5 The UART2 interface shown in FIG. 1 sends the control data in the first format to the SOC.
[0177] In some implementations, referring to the above example, after the SOC receives the control data in the first format, it can first parse the control data packaged by the Bluetooth protocol according to the UART communication protocol. Then, according to the version of the Bluetooth protocol, the control data in the HID format is parsed. Among them, the versions of the Bluetooth protocol include Bluetooth 1.1, Bluetooth 1.2, Bluetooth 2.0, Bluetooth 3.0, Bluetooth 4.0, Bluetooth 4.2, Bluetooth 5.0, Bluetooth 5.1, Bluetooth 5.2 and other versions. The higher version of the Bluetooth protocol can be backward compatible with the lower version of the Bluetooth protocol.
[0178] When the SOC does not support the OTG (On The Go) protocol, the USB interface on the SOC cannot send data to the wired input source device. In this case, it is necessary to add a serial port to USB conversion chip in the interface module to convert the control signal (the control signal in the first format) output by the SOC serial port into a USB format control signal (the control signal in the second format), and then send the control signal in the second format to the wired input source device through the Type-c interface through the USB multi-port repeater (HUB) in the interface module.
[0179] As an example, refer to Figure 5 , assuming Figure 5 The SOC in does not support OTG. The SOC is connected to the UART to USB conversion chip through UART0. The SOC packages the parsed HID control data into control data (the control signal of the first format to be converted) that meets the format requirements of the UART communication protocol according to the UART format requirements of the conversion chip. Then, the control signal of the first format to be converted is sent to the conversion chip through the UART0 interface. The conversion chip parses the control signal of the first format to be converted and obtains the HID control data. The conversion chip packages the HID control data into control data of the second format according to the USB communication protocol. Finally, the USB conversion chip controls the USB switch, connects the pin used to transmit the USB data signal in the Type-c interface to the USB HUB, and sends the control data of the second format to the wired input source device through the USB2.0 pin in the Type-c interface to achieve control of the wired input source device.
[0180] When the SOC supports OTG (On The Go), the USB interface on the SOC can send data to the wired input source device. In this case, the SOC can package the control data in HID format into the data format corresponding to USB (i.e., the control data in the second format) according to the USB communication protocol, or encapsulate the control data in HID format into a USB network data packet of the Remote Network Driver Interface Specification (RNDIS). And send the control signal in the second format to the wired input source device through the USB2.0 pin in the Type-c interface.
[0181] As an example, refer to Figure 6 , assuming Figure 6 The SOC in the device supports OTG. The SOC packages the parsed HID control data into control data in the second format according to the USB communication protocol, and sends the control data in the second format to the wired input source device through the pin for transmitting the USB data signal in the Type-c interface, so as to control the wired input source device.
[0182] In this embodiment, after determining that the input source device is a wired input source device, control data in a first format from the wireless external device is intercepted and converted into a control data format supported by an interface connecting the input source device and the electronic device, and the control data is sent to the input source device through the interface to achieve control of the input source device.
[0183] Here, Figure 5 Taking 200 as an example, a possible implementation of the control method provided in the present application is exemplarily described. Among them, the central processor of the electronic device 200 is SOC, the display processor is Scaler, SOC does not support OTG, and the wireless module communicates with SOC through the UART serial port. Video data is transmitted between SOC and Scaler through the HDMI interface, and control data is transmitted through the UART3 interface. The Bluetooth mouse 11 is connected to the electronic device 200 via Bluetooth, the smart phone 13 is connected to the electronic device 200 via Wi-Fi, and the laptop computer 14 is connected to the electronic device 200 via the Type-c interface. The operating system running on the electronic device 200 is the Android system.
[0184] Optionally, the Bluetooth keyboard 12 may also be connected to the electronic device 200 via Bluetooth.
[0185] Fig.10 Shows Figure 5 A data flow diagram of the electronic device 200 when implementing the control method provided in the present application.
[0186] refer to Figure 5 and Fig.10 When the electronic device 200 implements the control method provided by the present application, it can first obtain the access mode of the input source device in the current scene and whether the Bluetooth keyboard and mouse are connected through the Bluetooth keyboard and mouse feedback control service. The Bluetooth keyboard and mouse feedback control service can receive the access data reported by the Scaler, and determine the access mode of the input source device based on the access data. For example, the access data can be an interactive synchronization service between the SOC and the Scaler, that is, the SOC and the Scaler transmit control signals through UART3, and the SOC sends video data to the Scaler through the HDMI interface. When the access data indicates that there is an interactive synchronization service between the SOC and the Scaler, it can be determined that the input source device is a wireless input source device.
[0187] Alternatively, the access data may also be that the DP interface of the Scaler completes the handshake process specified in the DP protocol and receives the video data. The access data indicates that the DP interface of the Scaler completes the handshake process specified in the DP protocol and when the video data is received, it can be determined that the input source device is a wired input source device.
[0188] The Bluetooth keyboard and mouse feedback control service can also monitor system broadcasts. When a Bluetooth keyboard or Bluetooth mouse is connected to the electronic device 200, the system will broadcast the access information of the Bluetooth device. After the Bluetooth keyboard and mouse feedback control service monitors the access information of the Bluetooth device, it determines that the electronic device 200 is connected to the wireless control device.
[0189] When the Bluetooth keyboard and mouse feedback control service determines that the input source device is a wired input source device and the electronic device 200 is connected to a wireless control device, the control data of the Bluetooth keyboard and mouse in the input core can be intercepted through the virtual HID node and forwarded to the UART node.
[0190] For example, the Bluetooth keyboard and mouse respond to user operations, generate control data in HID format, and package the control data in HID format through the Bluetooth protocol, encapsulate it according to the UART communication protocol, and send it to the SOC through UART0. After the SOC parses the data packet forwarded by UART0, it sends the control data in HID format packaged by the Bluetooth protocol to the input driver. The input driver parses the control data in HID format and sends it to the input core.
[0191] The virtual HID intercepts the control data in HID format from the input core, and encapsulates the control data in HID format into control data in UART format according to the format requirements of the UART to USB conversion chip, and then transparently transmits it to UART0 through the UART node and sends it to the conversion chip. The conversion chip converts the control data in UART format into control data in USB format and sends it to the input source device through the Type-c interface.
[0192] In some implementations, as an example, the format requirements of the UART to USB conversion chip can refer to Table 1.
[0193] Table 1
[0194] Frame Header Address code Command code Subsequent data length Subsequent data Cumulative Sum HEAD ADDR CMD LEN DATA SUM 0x21, 0xCD 0x00 0x02 8 8 bytes 0x??
[0195] Among them, the frame header, address code, and command code are fixed formats required by the conversion chip. When the frame header, address code, and command code of the UART format data meet the values shown in Table 1, the UART to USB conversion chip will convert the UART format control data to generate USB format data. The subsequent data length is used to indicate the number of bytes of the data to be converted.
[0196] The subsequent data is determined according to the subsequent data length. In this embodiment, the subsequent data length is 8, and the subsequent data is 8 bytes of data. The cumulative sum is used to indicate the total data length.
[0197] In this embodiment, the length of the HID control signal sent by the mouse is 4 bytes, that is, the length of the subsequent data is 4, and the 8 bits of the first byte represent respectively:
[0198] bit7: 1 indicates that the change in the Y coordinate exceeds the range of -256 to 255, and 0 indicates that there is no overflow;
[0199] bit6: 1 indicates that the change in the X coordinate exceeds the range of -256 to 255, and 0 indicates that there is no overflow;
[0200] bit5: The sign bit of the Y coordinate change. 0 indicates a positive number, i.e. the mouse moves upward, and 1 indicates a negative number, i.e. the mouse moves downward.
[0201] bit4: The sign bit of the X coordinate change, 0 represents a positive number, that is, the mouse moves to the right, and 1 represents a negative number, that is, the mouse moves to the left;
[0202] bit3: always 1;
[0203] bit2: 1 indicates the middle button is pressed;
[0204] bit1: 1 means the right button is pressed;
[0205] bit0: 1 indicates the left button is pressed.
[0206] The second byte is used to indicate the change in the X coordinate, and together with bit 4 of the first byte, it forms a 9-bit signed number. A negative number indicates a left shift, and a positive number indicates a right shift. The change is indicated by the complement code.
[0207] The third byte is used for the Y coordinate change, and together with bit 5 of the first byte, it forms a 9-bit signed number, where a negative number indicates a downward shift and a positive number indicates an upward shift. The change is represented by the complement code.
[0208] The fourth byte is used to indicate the change of the scroll wheel.
[0209] For example, when the left button is pressed on the mouse, the corresponding UART format data is 0x21, 0xCD, 0x00, 0x02, 0x08, 0x01, 0x00, 0x00, 0x00.
[0210] In this embodiment, the length of the HID control signal sent by the keyboard is 8 bytes, that is, the length of the subsequent data is 8, and the 8 bits of the first byte represent:
[0211] bit7: Whether the right Window key is pressed, 1 means pressed, 0 means not pressed;
[0212] bit6: Whether the right Alt key is pressed, 1 means it is pressed, 0 means it is not pressed;
[0213] bit5: whether the right Shift key is pressed, 1 means pressed, 0 means not pressed;
[0214] bit4: Whether the right Ctrl key is pressed, 1 means it is pressed, 0 means it is not pressed;
[0215] bit3: Whether the left Window key is pressed, 1 means pressed, 0 means not pressed;
[0216] bit2: Whether the left Alt key is pressed, 1 means it is pressed, 0 means it is not pressed;
[0217] bit1: Whether the left Shift key is pressed, 1 means it is pressed, 0 means it is not pressed;
[0218] bit0: Whether the left Ctrl key is pressed, 1 means it is pressed, 0 means it is not pressed.
[0219] The second byte is reserved and its value is 0x00.
[0220] The third to eighth bytes are used to represent 6 keys, which are used to indicate the keys that are pressed.
[0221] For example, when the "A" key is pressed on the keyboard, the corresponding UART format data is 0x21, 0xCD, 0x00, 0x02, 0x08, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00.
[0222] The HID control data in USB format only includes the key information in the subsequent data. For example, for the above example of pressing the left mouse button, after conversion into the HID control data in USB format, it only includes 0x01, 0x00, 0x00, 0x00. And for the above example of pressing the "A" key on the keyboard, after conversion into the HID control data in USB format, it only includes 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00.
[0223] In some other implementations, the HID control data of the keyboard or mouse may also be implemented in other data formats, and the present application does not limit the specific implementation format of the HID control data.
[0224] In some other implementations, the virtual HID can also intercept the control data in HID format packaged through the Bluetooth protocol from the input driver, and encapsulate the control data in HID format packaged through the Bluetooth protocol into control data in UART format according to the format requirements of the UART to USB conversion chip, and then transparently transmit it to UART0 through the UART node and send it to the conversion chip. The conversion chip converts the control data in UART format into control data in USB format and sends it to the input source device through the USB2.0 pin in the Type-c interface.
[0225] When the Bluetooth keyboard and mouse feedback control service determines that the input source device is a wireless input source device and the electronic device 200 is connected to the wireless control device, the control data in the HID format packaged via the Bluetooth protocol received by the input driver can be parsed and transmitted back to the wireless input source device via Wi-Fi through the wireless reverse control protocol.
[0226] Among them, the wireless reverse control protocol can be the wireless reverse control protocol in the HUAWEI Cast+ projection protocol, or the reverse control protocol in Miracast, that is, the user input reverse channel (User Input Back Channel, UIBC). There is no restriction on the wireless reverse control protocol here.
[0227] In this embodiment, when the video data from the input source device is displayed by the electronic device 200, the access mode of the input source device is obtained, and the input source device is reversely controlled by the corresponding control mode according to different access modes. When the user switches the input source device, the input source device can be controlled without reconnecting the wireless control device to the displayed input source device, thereby improving the user experience.
[0228] Here, Figure 6 As an example, another possible implementation of the control method provided in the present application is exemplarily described. Among them, the central processor of the electronic device 200 is a SOC, the display processor is integrated in the SOC, the SOC supports OTG, and the wireless module communicates with the SOC through a UART serial port. The Bluetooth mouse 11 is connected to the electronic device 200 via Bluetooth, the smart phone 13 is connected to the electronic device 200 via Wi-Fi, and the laptop computer 14 is connected to the electronic device 200 via a Type-c interface. The operating system running on the electronic device 200 is the Android system.
[0229] Optionally, the Bluetooth keyboard 12 may also be connected to the electronic device 200 via Bluetooth.
[0230] Fig.11 Shows Figure 6 A data flow diagram of the electronic device 200 when implementing the control method provided in the present application.
[0231] refer to Figure 6 , Figure 7 and Fig.11 , the electronic device 200 receives the video data sent by the smartphone 13 via Wi-Fi, and the video data includes the interface of the smartphone 13. The electronic device 200 also receives the video data sent by the laptop 14 via the pin for transmitting the DP signal in the Type-c interface, and the video data includes the interface of the laptop 14. The SOC can notify the window synthesizer to distribute the video data input by each input source device, generate two activity windows (Activity) for displaying the video, and display the video data from different input source devices through the two Activities respectively. For example, refer to Figure 7 , the interface of the smart phone 13 can be displayed through window one 2001 , and the interface from the laptop computer 14 can be displayed through window two 2002 .
[0232] In this embodiment, the window synthesizer can determine the access mode of the input source device corresponding to each Activity by detecting whether the video data is encoded. When the window synthesizer detects that the video data displayed by the Activity is encoded video data, it can be determined that the input source device corresponding to the Activity is a wireless input source device. When the window synthesizer detects that the video data displayed by the Activity is unencoded video data, it can be determined that the input source device corresponding to the Activity is a wired input source device.
[0233] In this embodiment, the window synthesizer can determine whether the electronic device 200 is connected to the wireless control device by monitoring the system broadcast.
[0234] After determining that the electronic device is connected to the wireless control device, the window synthesizer can confirm the active Activity. For example, when the wireless control device is a mouse, the coordinates of the mouse pointer on the screen can be obtained. When the coordinates of the mouse pointer are within the range of window one, window one is determined to be the active Activity. When the coordinates of the mouse pointer are within the range of window two, window two is determined to be the active Activity.
[0235] When the window synthesizer determines that the input source device corresponding to the active Activity is a wired input source device and the electronic device 200 is connected to a wireless control device, the control data of the Bluetooth keyboard and mouse in the input driver node can be obtained and forwarded to the USB node.
[0236] For example, the Bluetooth keyboard and mouse respond to user operations, generate control data in HID format, and package the control data in HID format through the Bluetooth protocol, encapsulate it according to the UART communication protocol, and send it to the SOC through UART0. After the SOC parses the data packet forwarded by UART0, it sends the control data in HID format packaged by the Bluetooth protocol to the input driver. The input driver parses the control data in HID format and sends it to the input core. The input core sends the control data in HID format to the input driver node.
[0237] The window synthesizer obtains the control data in HID format from the input driver node, encapsulates the control data in HID format into control data in USB format, or encapsulates the control data in HID format into a USB network data packet of RNDIS, and sends it to the USB node, which sends it to the input source device through the Type-c interface.
[0238] In some other implementations, the virtual HID can also intercept the control data in HID format packaged through the Bluetooth protocol from the input driver, encapsulate the control data in HID format packaged through the Bluetooth protocol into control data in USB format, or encapsulate the control data in HID format into a USB network data packet of RNDIS. Then, it is sent to the input source device through the pin for transmitting USB2.0 signals in the Type-c interface.
[0239] When the window synthesizer determines that the input source device corresponding to the active Activity is a wireless input source device and the electronic device 200 is connected to a wireless control device, the control data in the HID format packaged via the Bluetooth protocol received by the input driver can be parsed through the wireless reverse control protocol and the control data can be transmitted back to the wireless input source device via Wi-Fi.
[0240] The wireless reverse control protocol may be the wireless reverse control protocol in the HUAWEI Cast+ screen projection protocol, or the reverse control protocol in Miracast, namely UIBC. No restriction is imposed on the wireless reverse control protocol herein.
[0241] In this embodiment, when video data from multiple input source devices are displayed by the electronic device 200, the input source devices can be reversely controlled by using corresponding control methods according to the access method of each input source device. The user can watch the interfaces of multiple input source devices at the same time, and each input source device can be controlled by a wireless control device without switching the input source, thereby increasing the application scenarios of the control method provided by the present application and improving the user experience.
[0242] Fig.12 Another application scenario of the control method is shown, in which, in addition to Figure 5The device shown in FIG. 2 also includes an audio module 270 .
[0243] The audio module 270 includes a digital signal processor (DSP), a power amplifier (PA), a codec (Codec), a microphone, and a speaker. The DSP is connected to the display processor via the integrated circuit built-in audio bus (Inter-IC Sound, I2S), the microphone is connected to the DSP for inputting audio to the DSP, the DSP is connected to the PA, and the PA is connected to the speaker. The PA can receive audio data from the DSP, amplify the audio power, and play it through the speaker. The Codec is connected to the DSP and also to the audio interface. The Codec can receive audio data from the DSP, convert the digital audio data into analog audio signals, and send them through the audio interface.
[0244] Alternatively, the Codec can also receive analog audio signals from an audio interface, convert the analog sound signals into digital audio data, and send them to the DSP for processing.
[0245] In some implementations, the display processor can send the audio data in the video data transmitted by the DP interface or the HDMI interface to the DSP through the I2S interface. The DSP sends the audio data from the video data to the PA, which amplifies the audio and plays it through the speaker. Alternatively, the DSP can also convert the audio data from the video data into an analog audio signal through the Codec, and send it to the earphone connected to the audio interface through the audio interface, and play the audio through the earphone.
[0246] In some other implementations, the microphone can receive audio data and process the audio data through the DSP. Then, the DSP encapsulates the audio data into a USB format and sends it to the SOC or through the USB HUB and the USB switching switch, and transparently transmits it to the input source device connected to the Type-c interface.
[0247] Similarly, analog audio signals can be collected through the headphone microphone connected to the audio interface, converted into digital audio data through the Codec, and then sent to the DSP. The DSP processes the audio data and encapsulates it into USB format, sends it to the SOC or through the USB HUB and USB switch, and transparently transmits it to the input source device connected to the Type-c interface.
[0248] By adding an audio module to the electronic device 200, when the input source device interface is displayed, the audio from the input source device can be played without adding an additional audio device, which can better meet user needs and improve the user experience.
[0249] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0250] Corresponding to the control method provided in the above embodiment, Fig.13 A structural block diagram of a control device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0251] refer to Fig.13 , the control device comprises:
[0252] The conversion module 41 is used to convert the control data in the first format into control data in the second format when it is determined that the input source device is connected to the electronic device via a wired manner and the electronic device receives control data in the first format, wherein the second format is determined by the electronic device based on the type of interface connecting the input source device and the electronic device.
[0253] The sending module 42 is used to send the control data in the second format to the input source device through the interface connecting the input source device and the electronic device.
[0254] In some implementations, the processing module of the electronic device includes a central processing unit and a display processor, the first communication serial port on the display processor is connected to the central processing unit, and the first video interface on the display processor is connected to an interface connecting an input source device and the electronic device.
[0255] Fig.14 A structural block diagram of another control device provided in an embodiment of the present application is shown.
[0256] The display processor sends the receiving state of the first video interface to the central processor through the first communication serial port, and the receiving state includes receiving video data or not receiving video data.
[0257] refer to Fig.14 The control device further includes a determination module 43 for determining that the input source device is connected to the electronic device in a wired manner when the receiving state of the first video interface is receiving video data.
[0258] In some implementations, the processing module of the electronic device includes a central processing unit, and the second video interface on the central processing unit receives video data from an input source device.
[0259] When the video data received by the second video interface is uncoded video data, the determination module 43 is specifically configured to determine that the input source device is connected to the electronic device in a wired manner.
[0260] In some implementations, the processing module of the electronic device includes a central processing unit, which includes at least two video interfaces, the video interfaces are used to receive video data from an input source device, and the electronic device displays the video data from each video interface through different windows.
[0261] The determination module 43 is further used to determine a first window among the at least two windows, the first window being an active window, and to determine that an input source device corresponding to the first window is connected to the electronic device via a wired manner when the video data received by the video interface corresponding to the first window is uncoded video data.
[0262] Fig.15 A structural block diagram of another control device provided in an embodiment of the present application is shown.
[0263] In some implementations, the wireless module in the electronic device is connected to the central processor via the second communication serial port.
[0264] refer to Fig.15 The control device also includes a receiving module 44, which is used to receive control data in a first format through a second communication serial port.
[0265] In some implementations, the wireless control device is in communication with the wireless module. The control data in the first format is generated by the wireless control device in response to a user operation.
[0266] In some implementations, the wireless module is connected to a network for communication. The control data in the first format is control data received by the wireless module from the network.
[0267] In some implementations, when the electronic device supports the OTG protocol, the conversion module 41 is specifically configured to convert the control data in the first format into the control data in the second format through the central processing unit.
[0268] In some implementations, when the electronic device does not support the OTG protocol, the electronic device includes a conversion chip, and the third communication serial port of the central processing unit is communicatively connected to the conversion chip.
[0269] The conversion module 41 is specifically configured to send the control data in the first format to the conversion chip through the third communication serial port, and convert the control data in the first format into the control data in the second format through the conversion chip.
[0270] Fig.16 A structural block diagram of another control device provided in an embodiment of the present application is shown.
[0271] In some implementations, the electronic device further includes a speaker, and the video data received by the electronic device further includes audio data.
[0272] refer to Fig.16The control device also includes a playing module 45, which is used to play the audio data through a speaker.
[0273] Fig.17 A structural block diagram of another control device provided in an embodiment of the present application is shown.
[0274] In some implementations, the electronic device further includes a microphone.
[0275] refer to Fig.17 The control device also includes a sound receiving module 46, which is used to send the audio data collected by the microphone to the input source device through the interface connecting the input source device and the electronic device.
[0276] It should be noted that the information interaction, execution process and other contents between the above-mentioned modules are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0277] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0278] The functional units and modules in the embodiments may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware or in the form of software functional units.
[0279] In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other and are not used to limit the protection scope of this application. The specific working process of the units and modules in the above system can refer to the corresponding process in the above method embodiment, which will not be repeated here.
[0280] Fig.18 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Fig.18 As shown, the electronic device 5 of this embodiment includes:
[0281] At least one processor 501 ( Fig.18 Only one is shown in the figure) a processor, a memory 502, and a computer program 503 stored in the memory 502 and executable on at least one processor 501, and when the processor 501 executes the computer program 503, the steps in the above control method embodiment are implemented.
[0282] The electronic device 5 may be a display, a smart screen, a projector, a television, a large screen device or other electronic device with a display function. The electronic device may include, but is not limited to, a processor 501 and a memory 502. Those skilled in the art will appreciate that Fig.18 It is only an example of the electronic device 5 and does not constitute a limitation on the electronic device 5. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.
[0283] The processor 501 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), SOC, field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0284] In some embodiments, the memory 502 may be an internal storage unit of the electronic device 5, such as a hard disk or memory of the electronic device 5. In other embodiments, the memory 502 may also be an external storage device of the electronic device 5, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc., equipped on the electronic device 5.
[0285] Furthermore, the memory 502 may also include both an internal storage unit of the electronic device 5 and an external storage device. The memory 502 is used to store an operating system, an application program, a boot loader, data, and other programs, such as program codes of a computer program, etc. The memory 502 may also be used to temporarily store data that has been output or is to be output.
[0286] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0287] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0288] An embodiment of the present application provides a chip system, which includes a memory and a processor. The processor executes a computer program stored in the memory to implement the steps in the above-mentioned method embodiments.
[0289] An embodiment of the present application provides a chip system, which includes a processor, the processor is coupled to a computer-readable storage medium, and the processor executes a computer program stored in the computer-readable storage medium to implement the steps in the above-mentioned method embodiments.
[0290] If the control method provided by the present application is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented.
[0291] Among them, the computer program includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. Computer readable media may at least include: any entity or device capable of carrying computer program code to an electronic device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. For example, USB flash drive, mobile hard disk, magnetic disk or optical disk. In some jurisdictions, according to legislation and patent practice, computer readable media cannot be electric carrier signal and telecommunication signal.
[0292] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0293] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0294] In the embodiments provided in the present application, it should be understood that the disclosed methods, devices, and electronic devices can be implemented in other ways. For example, the device embodiments described above are merely schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0295] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0296] Finally, it should be noted that the above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A control method, characterized in that: include: Displaying at least two windows, wherein a first window of the at least two windows is used to display video data of an input source device, and another window of the at least two windows is used to display video data of another input source device; Determining that the input source device is connected to the electronic device in a wired manner, the other input source device is connected to the electronic device in a wireless manner, the electronic device comprises a wireless communication module, a central processing unit and a conversion chip, the wireless communication module is connected to the central processing unit through a second communication serial port, and the third communication serial port of the central processing unit is communicatively connected to the conversion chip; receiving control data in a first format from a wireless control device through the second communication serial port, the wireless control device being connected to the electronic device through a wireless manner; If the first window is an active window, the central processing unit sends the control data in the first format to the conversion chip through the third communication serial port. When determining that the data structure of the control data in the first format includes a frame header, an address code, and a command code, the frame header is a first value, the address code is a second value, and the command code is a third value, the conversion chip converts the control data in the first format into control data in a second format. The conversion chip sends the control data in the second format to the input source device through the interface connecting the input source device and the electronic device. The second format is determined by the electronic device according to the type of the interface connecting the input source device and the electronic device. If the other window is an active window, the control data in the first format is sent to the other input source device through a wireless reverse control protocol.
2. The method according to claim 1, characterized in that The processing module of the electronic device includes the central processor and the display processor, the first communication serial port on the display processor is connected to the central processor, and the first video interface on the display processor is connected to the interface connecting the input source device and the electronic device; The step of determining that the input source device is connected to the electronic device via a wired manner includes: The display processor sends the receiving state of the first video interface to the central processor through the first communication serial port, wherein the receiving state includes receiving video data or not receiving video data; When the receiving state of the first video interface is receiving video data, the central processor determines that the input source device is connected to the electronic device in a wired manner.
3. The method according to claim 1, characterized in that: The processing module of the electronic device includes the central processor, and the second video interface on the central processor receives video data from an input source device; The step of determining that the input source device is connected to the electronic device via a wired manner includes: When the video data received by the second video interface is unencoded video data, the central processor determines that the input source device is connected to the electronic device in a wired manner.
4. The method according to claim 1, characterized in that The processing module of the electronic device includes the central processor, the central processor includes at least two video interfaces, the video interfaces are used to receive video data from an input source device, and the electronic device displays the video data from each video interface through different windows; The step of determining that the input source device is connected to the electronic device via a wired manner includes: When the video data received by the video interface corresponding to the first window is unencoded video data, the central processor determines that the input source device corresponding to the first window is connected to the electronic device in a wired manner.
5. The method according to claim 1, characterized in that The control data in the first format is generated by the wireless control device in response to a user operation.
6. The method according to any one of claims 2 to 4, characterized in that: The electronic device further includes a speaker, and the video data received by the electronic device further includes audio data; The electronic device plays the audio data through the speaker.
7. The method according to any one of claims 1 to 6, characterized in that: The electronic device also includes a microphone; The electronic device sends the audio data collected by the microphone to the input source device through an interface connecting the input source device and the electronic device.
8. A control device, characterized in that: include: A processing module, configured to display at least two windows, wherein a first window of the at least two windows is configured to display video data of an input source device, and another window of the at least two windows is configured to display video data of another input source device; a determination module, used to determine that the input source device is connected to the electronic device in a wired manner, the other input source device is connected to the electronic device in a wireless manner, the electronic device comprises a wireless communication module, a central processing unit and a conversion chip, the wireless communication module is connected to the central processing unit via a second communication serial port, and the third communication serial port of the central processing unit is communicatively connected to the conversion chip; a receiving module, configured to receive control data in a first format from a wireless control device through the second communication serial port, the wireless control device being connected to the electronic device through a wireless manner; a conversion module, configured to, if the first window is an active window, send the control data in the first format to the conversion chip through the third communication serial port, and when the conversion chip determines that the data structure of the control data in the first format includes a frame header, an address code, and a command code, the frame header is a first value, the address code is a second value, and the command code is a third value, convert the control data in the first format into control data in a second format, wherein the second format is determined by the electronic device according to a type of interface connecting the input source device and the electronic device; a sending module, configured to send the control data in the second format to the input source device through the conversion chip and an interface connecting the input source device and the electronic device if the first window is an active window; If the other window is an active window, the control data in the first format is sent to the other input source device through a wireless reverse control protocol.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
