Control method and device

By detecting the port connection status of the AIO device and switching the usage mode control method, the problem of not being displayed when the AIO device is interconnected is solved, and the normal display of the device is realized.

CN119937959APending Publication Date: 2025-05-06LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411998143.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

Under the integrated design of all-in-one (AIO) devices, if there is no automatic detection of the mode button, when the two AIO devices are interconnected through the connecting line, the problem of neither side cannot be displayed.

Method used

A control method and device are provided, by detecting the port connection status of the electronic device, the control processing module acquires the target status, and switches the usage mode according to the target status to ensure that the device can display normally.

Benefits of technology

It realizes that when interconnecting between AIO devices, ensures that the device can display normally, and solves the problem of inability to display.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119937959A_ABST
    Figure CN119937959A_ABST
Patent Text Reader

Abstract

The invention discloses a control method and device, is applied to first electronic equipment, and comprises the following steps: in response to obtaining that a first port of the first electronic equipment is in a connection state, controlling a processing module of the first electronic equipment to obtain a first target state corresponding to the first electronic equipment; under the condition that the first target state is the first state, the first electronic equipment is controlled to be in a first use mode; under the condition that the first target state is in the second state, the first electronic equipment is controlled to be in a second use mode; wherein the first use mode is different from the second use mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to control technology, and in particular to a control method and device. Background Art

[0002] At present, All-in-One (AIO) is equipped with a port with input and output functions. The output signal and input signal of the port are integrated into a physical port under the integrated (combo) design. If there is no automatic detection of the mode button, when two AIO all-in-one machines are interconnected through a connecting cable, the problem of no display on both sides will occur. Summary of the invention

[0003] The present application provides a control method and device.

[0004] The technical solution of this application is implemented as follows:

[0005] In a first aspect, a control method is provided, which is applied to a first electronic device, including:

[0006] In response to obtaining that the first port of the first electronic device is in a connected state, controlling a processing module of the first electronic device to obtain a first target state corresponding to the first electronic device;

[0007] When the first target state is in a first state, controlling the first electronic device to be in a first usage mode;

[0008] When the first target state is in a second state, controlling the first electronic device to be in a second usage mode;

[0009] The first usage mode is different from the second usage mode.

[0010] In a second aspect, a control device is provided, which is applied to a first electronic device, including:

[0011] a control unit, configured to, in response to obtaining that the first port of the first electronic device is in a connected state, control a processing module of the first electronic device to obtain a first target state corresponding to the first electronic device;

[0012] The control unit is further configured to control the first electronic device to be in a first usage mode when the first target state is in a first state;

[0013] The control unit is further configured to control the first electronic device to be in a second usage mode when the first target state is in a second state;

[0014] The first usage mode is different from the second usage mode.

[0015] According to a third aspect, an electronic device is provided, comprising: a processor and a memory configured to store a computer program that can be run on the processor, wherein the processor is configured to execute the steps of the method of the first aspect when running the computer program.

[0016] According to a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, wherein the computer program implements the steps of the method according to the first aspect when executed by a processor.

[0017] According to a fifth aspect, a computer program product is provided, comprising a computer program, wherein the computer program implements the steps of the method according to the first aspect when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 The control method in the embodiment of the present application is shown in FIG. Figure 1 ;

[0019] Figure 2 The control method in the embodiment of the present application is shown in FIG. Figure 2 ;

[0020] Figure 3 The control method in the embodiment of the present application is shown in FIG. Figure 3 ;

[0021] Figure 4 The control method in the embodiment of the present application is shown in FIG. Figure 4 ;

[0022] Figure 5 The control method in the embodiment of the present application is shown in FIG. Figure 5 ;

[0023] Figure 6 The control method in the embodiment of the present application is shown in FIG. Figure 6 ;

[0024] Figure 7 The control method in the embodiment of the present application is shown in FIG. Figure 7 ;

[0025] Figure 8 The control method in the embodiment of the present application is shown in FIG. Figure 8 ;

[0026] Fig. 9 The control method in the embodiment of the present application is shown in FIG. Figure 9 ;

[0027] Fig.10 This is a schematic diagram of the structure of the first AIO device in the embodiment of the present application;

[0028] Fig.11 This is a schematic diagram of the structure of the control device in the embodiment of the present application;

[0029] Fig.12 This is a schematic diagram of the structure of the first electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0030] In order to enable a more detailed understanding of the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application.

[0031] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing this embodiment and are not intended to limit this application.

[0032] In the following description, references to “some embodiments,” “this embodiment,” “this embodiment,” and examples, etc., describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.

[0033] If similar descriptions of "first / second" appear in the application documents, the following instructions are added. In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the present embodiment described here can be implemented in an order other than that illustrated or described here.

[0034] In this embodiment, the term "and / or" is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, object A and / or object B may represent three situations: object A exists alone, object A and object B exist at the same time, and object B exists alone.

[0035] The present application embodiment provides a control method, Figure 1 The control method in the embodiment of the present application is shown in FIG. Figure 1 , applied to a first electronic device, the first electronic device includes but is not limited to an All In One (AIO) electronic device (a highly integrated computer device).

[0036] like Figure 1 As shown, the control method includes the following steps S101 to S103:

[0037] Step S101: in response to obtaining that a first port of a first electronic device is in a connection state, controlling a processing module of the first electronic device to obtain a first target state corresponding to the first electronic device.

[0038] In the embodiment of the present application, the first electronic device is configured with a first port, and the first port integrates input and output functions, that is, it can transmit data and receive data. Exemplarily, the first port includes but is not limited to a high-definition multimedia port (High Definition Multimedia Interface, HDMI), a display port (Display Port, DP) and a Type C port.

[0039] In an embodiment of the present application, when a connecting cable is inserted into the first port of the first electronic device, that is, the first port is in a connected state, a processing module (such as a display control module or a central processing unit (CPU)) of the first electronic device is controlled to obtain a first target state corresponding to the first electronic device.

[0040] The first target state represents whether the first electronic device is in the first state or the second state. The first state is different from the second state. For example, the first state represents that the first electronic device is used as a main control device, and the second state represents that the first electronic device is used as an auxiliary device. Alternatively, the first state represents that the first electronic device is used as an auxiliary device, and the second state represents that the first electronic device is used as a main control device.

[0041] Step S102: When the first target state is in the first state, control the first electronic device to be in the first usage mode.

[0042] Exemplarily, the first state represents that when the first electronic device is used as a main control device, the first use mode is a host mode. Alternatively, the first state represents that when the first electronic device is used as an auxiliary device, the first use mode is a display mode.

[0043] When the first electronic device is in the host mode, it means that the first electronic device is responsible for sending data of the first port. When the first electronic device is in the display mode, it means that the first electronic device is responsible for receiving and displaying data of the first port.

[0044] Step S103: when the first target state is in the second state, control the first electronic device to be in the second usage mode; wherein the first usage mode is different from the second usage mode.

[0045] Exemplarily, the second state represents that when the first electronic device is used as a main control device, the second use mode is a host mode. Alternatively, the second state represents that when the first electronic device is used as an auxiliary device, the second use mode is a display mode.

[0046] The first use mode is different from the second use mode. Exemplarily, when the first use mode is the host mode, the second use mode is the display mode. Or when the first use mode is the display mode, the second use mode is the host mode.

[0047] In an embodiment of the present application, the usage mode of the first electronic device is controlled according to the first target state corresponding to the first electronic device. Correspondingly, the usage mode of the second electronic device can be controlled according to the second target state corresponding to the second electronic device. When the usage mode of the first electronic device is inconsistent with the usage mode of the second electronic device, both the first electronic device and the second electronic device can display normally.

[0048] In some embodiments of the present application, the control method includes the following steps S201 to S202.

[0049] Step S201: in response to obtaining that the first port of the first electronic device is in a connected state, controlling the processing module of the first electronic device to obtain a first target state corresponding to the first electronic device.

[0050] Step S202: Detect a signal from a second port of a second electronic device connected to the first port, and if a first condition is met, obtain a second target state corresponding to the second electronic device at the first port; wherein the first condition indicates that the first electronic device and the second electronic device belong to the same type of device.

[0051] In the embodiment of the present application, the second port and the first port are the same type of ports. Therefore, if the first port is an HDMI port, the second port is an HDMI port; if the first port is a DP port, the second port is a DP port; if the first port is a Type C port, the second port is a Type C port.

[0052] In an embodiment of the present application, when a connecting cable is inserted into the first port of the first electronic device, that is, the first port is in a connected state, a signal acquisition request is sent to the second electronic device through the communication port, and when a signal is received from the second port of the second electronic device through the communication port, if a category signal for identifying the second electronic device detected from the second port satisfies a first condition, it is determined that the first electronic device and the second electronic device belong to the same category of devices, and then a status acquisition request is sent to the second electronic device through the communication port, thereby acquiring the second target state corresponding to the second electronic device through the communication port.

[0053] The second target state represents whether the second electronic device is in the first state or the second state. The first state is different from the second state. For example, the first state represents that the second electronic device is used as a main control device, and the second state represents that the second electronic device is used as an auxiliary device. Alternatively, the first state represents that the second electronic device is used as an auxiliary device, and the second state represents that the second electronic device is used as a main control device.

[0054] Exemplarily, if the first electronic device is an AIO device, the second electronic device is also an AIO device.

[0055] Step S203: When the first target state is in the first state and the second target state is in the second state, control the first electronic device to be in the first usage mode and control the second electronic device to be in the second usage mode.

[0056] In an embodiment of the present application, when the first target state is in the first state and the second target state is in the second state, the first electronic device is controlled to be in the first usage mode, and a control instruction is sent to the second electronic device through the communication port, so that the second electronic device responds to the control instruction and controls itself to be in the second usage mode.

[0057] In the embodiment of the present application, when the first target state is in the first state and the second target state is in the second state, if the first state represents that the first electronic device is used as a main control device and the second state represents that the second electronic device is used as an auxiliary device, the first electronic device is controlled to be in a host mode, and a control instruction is sent to the second electronic device through the communication port, so that the second electronic device responds to the control instruction and controls itself to be in a display mode. Alternatively, if the first state represents that the first electronic device is used as an auxiliary device and the second state represents that the second electronic device is used as a main control device, the first electronic device is controlled to be in a display mode, and a control instruction is sent to the second electronic device through the communication port, so that the second electronic device responds to the control instruction and controls itself to be in a host mode.

[0058] Step S204: When the first target state is in the second state and the second target state is in the first state, control the first electronic device to be in the second usage mode and control the second electronic device to be in the first usage mode.

[0059] In an embodiment of the present application, when the first target state is in the second state and the second target state is in the first state, the first electronic device is controlled to be in the second usage mode, and a control instruction is sent to the second electronic device through the communication port, so that the second electronic device responds to the control instruction and controls itself to be in the first usage mode.

[0060] In the embodiment of the present application, when the first target state is in the second state and the second target state is in the first state, if the second state represents that the first electronic device is used as the main control device and the first state represents that the second electronic device is used as the auxiliary device, the first electronic device is controlled to be in the host mode, and a control instruction is sent to the second electronic device through the communication port, so that the second electronic device responds to the control instruction and controls itself to be in the display mode. Alternatively, if the second state represents that the first electronic device is used as the auxiliary device and the first state represents that the second electronic device is used as the main control device, the first electronic device is controlled to be in the display mode, and a control instruction is sent to the second electronic device through the communication port, so that the second electronic device responds to the control instruction and controls itself to be in the host mode.

[0061] In some embodiments of the present application, the first target state includes a first voltage of a preset module of the first electronic device, and the second target state includes a second voltage of a preset module of the second electronic device.

[0062] In the embodiment of the present application, the voltage of the preset module is used to measure whether the electronic device is turned on. Exemplarily, the preset module includes but is not limited to: a display control module (such as a scalar), a wireless network module (Wireless Fidelity, Wi-Fi) and a solid state drive (Solid State Drive, SSD).

[0063] Based on this, the following step S301 is also included.

[0064] Step S301: When the first voltage is a first preset value and the second voltage is a second preset value, control the first electronic device to be in a first state and control the second electronic device to be in a second state; wherein the first preset value is the voltage value of the preset module when the electronic device is powered on, and the second preset value is the voltage value of the preset module when the electronic device is powered off.

[0065] Exemplarily, when the voltage of the scalar module of the first electronic device is a first preset value, and the voltage of the scalar module of the second electronic device is a second preset value, it means that the first electronic device is turned on and the second electronic device is turned off, thereby controlling the first electronic device to be in a first state and controlling the second electronic device to be in a second state. At this time, the first state represents the first electronic device as a main control device, and the second state represents the second electronic device as an auxiliary device. Among them, the voltage of the scalar module in the working state can be 12V. Accordingly, the first electronic device is controlled to be in a host mode, and the second electronic device is controlled to be in a display mode, that is, the first electronic device transmits information to the second port of the second electronic device through the first port for display.

[0066] Exemplarily, when the voltage of the Wi-Fi module of the first electronic device is a first preset value, and the voltage of the Wi-Fi module of the second electronic device is a second preset value, it means that the first electronic device is turned on and the second electronic device is turned off, thereby controlling the first electronic device to be in a first state and controlling the second electronic device to be in a second state. At this time, the first state represents the first electronic device as a main control device, and the second state represents the second electronic device as an auxiliary device. Among them, the voltage of the Wi-Fi module in the working state can be 3.3V or 5V. Accordingly, the first electronic device is controlled to be in host mode and the second electronic device is controlled to be in display mode, that is, the first electronic device transmits information to the second port of the second electronic device through the first port for display.

[0067] Exemplarily, when the voltage of the SSD module of the first electronic device is the first preset value, and the voltage of the SSD module of the second electronic device is the second preset value, it means that the first electronic device is turned on and the second electronic device is turned off, thereby controlling the first electronic device to be in the first state and the second electronic device to be in the second state. At this time, the first state represents the first electronic device as the main control device, and the second state represents the second electronic device as the auxiliary device. Among them, the voltage of the SSD module in the working state can be 3.3V or 5V or 12V. Accordingly, the first electronic device is controlled to be in the host mode and the second electronic device is controlled to be in the display mode, that is, the first electronic device transmits information to the second port of the second electronic device through the first port for display.

[0068] In some embodiments of the present application, the first target state further includes a first connection signal of an external device of the first electronic device, and the second target state includes a second connection signal of an external device of the second electronic device.

[0069] In the embodiment of the present application, the connection signal is used to indicate whether the electronic device is connected to its external device.

[0070] Based on this, the following steps S401 to S402 are also included.

[0071] Step S401: when the first voltage is a first preset value and the second voltage is a first preset value, controlling the first electronic device to be in a first state and controlling the second electronic device to be in a first state.

[0072] In the embodiment of the present application, when the first voltage of the preset module of the first electronic device is the first preset value, and the second voltage of the preset module of the second electronic device is the second preset value, it means that the first electronic device and the second electronic device are both turned on, then the first electronic device and the second electronic device are both controlled to be in the first state. At this time, the states of the two electronic devices are the same, and it is impossible to distinguish which electronic device is the main device and which electronic device is the auxiliary device. Therefore, it is further determined whether the first electronic device and the second electronic device are connected to their external devices. The external device can be a keyboard, and the user inputs information to the electronic device by operating the keyboard. Therefore, the electronic device connected to the external device is controlled to be the main device, and the electronic device not connected to the external device is controlled to be the auxiliary device.

[0073] Step S402: When the first connection signal indicates that the first electronic device is connected to an external device and the second connection signal indicates that the second electronic device is not connected to the external device, control the first electronic device to be in a first state and control the second electronic device to switch from the first state to a second state.

[0074] In the embodiment of the present application, when the first connection signal of the external device of the first electronic device indicates that the first electronic device is connected to the external device, and the second connection signal of the external device of the second electronic device indicates that the second electronic device is not connected to the external device, it means that the user wants the first electronic device to be the main control device. Therefore, the first electronic device is controlled to be in the first state, and the second electronic device is controlled to switch from the first state to the second state. At this time, the first state represents that the first electronic device is used as the main control device, and the second state represents that the second electronic device is used as the auxiliary device. Correspondingly, the first electronic device is controlled to be in the host mode, and the second electronic device is controlled to be in the display mode, that is, the first electronic device transmits information to the second port of the second electronic device through the first port for display.

[0075] In some embodiments of the present application, the following step S501 is also included.

[0076] Step S501: When the first connection signal indicates that the first electronic device is not connected to an external device and the second connection signal indicates that the second electronic device is connected to an external device, control the first electronic device to switch from a first state to a second state and control the second electronic device to be in the first state.

[0077] In the embodiment of the present application, when the first connection signal of the external device of the first electronic device indicates that the first electronic device is not connected to the external device, and the second connection signal of the external device of the second electronic device indicates that the second electronic device is connected to the external device, it means that the user wants the second electronic device to be the main control device. Therefore, the first electronic device is controlled to switch from the first state to the second state, and the second electronic device is controlled to be in the first state. At this time, the first state represents that the first electronic device is used as an auxiliary device, and the second state represents that the second electronic device is used as a main control device. Correspondingly, the first electronic device is controlled to be in display mode, and the second electronic device is controlled to be in host mode, that is, the second electronic device transmits information to the first port of the first electronic device through the second port for display.

[0078] In some embodiments of the present application, the first target state also includes a first working state of an external device of the first electronic device, and the second target state includes a second working state of an external device of the second electronic device.

[0079] In the embodiment of the present application, the working status of the external device represents whether the external device is working.

[0080] Based on this, the following steps S601 to S602 are also included.

[0081] Step S601: when the first connection signal indicates that the first electronic device is connected to an external device, and the second connection signal indicates that the second electronic device is connected to the external device, the first electronic device is controlled to be in the first state, and the second electronic device is controlled to be in the second state.

[0082] In the embodiment of the present application, when the first connection signal of the external device of the first electronic device indicates that the first electronic device is not connected to the external device, and the second connection signal of the external device of the second electronic device indicates that the second electronic device is connected to the external device, at this time, both electronic devices are connected to the external devices, and it is impossible to distinguish which electronic device is the main device and which electronic device is the auxiliary device. Therefore, it is further determined whether the external devices connected to the first electronic device and the second electronic device are working, and then the electronic device that controls the external device to be in a working state is the main device, and the electronic device that controls the external device to be in a dormant state is the auxiliary device.

[0083] Step S602: When the first working state indicates that the external device of the first electronic device is in working state and the second working state indicates that the external device of the second electronic device is in sleep state, control the first electronic device to be in the first state and control the second electronic device to switch from the first state to the second state.

[0084] In the embodiment of the present application, when the first working state of the external device of the first electronic device indicates that the external device of the first electronic device is in working state, and the second working state of the external device of the second electronic device indicates that the external device of the second electronic device is in sleep state, it means that the user wants the first electronic device to be the main control device. Therefore, the first electronic device is controlled to be in the first state, and the second electronic device is controlled to switch from the first state to the second state. At this time, the first state represents that the first electronic device is used as the main control device, and the second state represents that the second electronic device is used as the auxiliary device. Correspondingly, the first electronic device is controlled to be in the host mode, and the second electronic device is controlled to be in the display mode, that is, the first electronic device transmits information to the second port of the second electronic device through the first port for display.

[0085] In some embodiments of the present application, the following step S701 is also included.

[0086] Step S701: When the first working state indicates that the external device of the first electronic device is in a dormant state and the second working state indicates that the external device of the second electronic device is in a working state, control the first electronic device to switch from the first state to the second state and control the second electronic device to be in the first state.

[0087] In the embodiment of the present application, when the first working state of the external device of the first electronic device indicates that the external device of the first electronic device is in a dormant state, and the second working state of the external device of the second electronic device indicates that the external device of the second electronic device is in a working state, it means that the user wants the second electronic device to be the main control device. Therefore, the first electronic device is controlled to switch from the first state to the second state, and the second electronic device is controlled to be in the first state. At this time, the second state represents that the first electronic device is used as an auxiliary device, and the first state represents that the second electronic device is used as a main control device. Correspondingly, the first electronic device is controlled to be in a display mode, and the second electronic device is controlled to be in a host mode, that is, the second electronic device transmits information to the first port of the first electronic device through the second port for display.

[0088] In some embodiments of the present application, the following steps S801 to S804 are also included.

[0089] Step S801: controlling a processing module of a first electronic device to obtain a first pin signal of an external device.

[0090] The first pin signal is used to indicate the working state of the external device of the first electronic device.

[0091] Step S802: Acquire a second pin signal of an external device corresponding to the second electronic device at the first port.

[0092] The second pin signal is used to indicate the working state of the external device of the second electronic device.

[0093] Step S803: determining a first working state of an external device of the first electronic device based on the first pin signal.

[0094] Exemplarily, if the first pin signal is a high-level signal, the first working state of the external device of the first electronic device indicates that the external device of the first electronic device is in working state; if the first pin signal is a low-level signal, the first working state of the external device of the first electronic device indicates that the external device of the first electronic device is in sleep state. Alternatively, if the first pin signal is a low-level signal, the first working state of the external device of the first electronic device indicates that the external device of the first electronic device is in working state; if the first pin signal is a high-level signal, the first working state of the external device of the first electronic device indicates that the external device of the first electronic device is in sleep state.

[0095] Step S804: determining a second working state of an external device of the second electronic device based on the second pin signal.

[0096] Exemplarily, if the second pin signal is a high-level signal, the second working state of the external device of the second electronic device indicates that the external device of the second electronic device is in working state; if the second pin signal is a low-level signal, the second working state of the external device of the second electronic device indicates that the external device of the second electronic device is in sleep state. Alternatively, if the second pin signal is a low-level signal, the second working state of the external device of the second electronic device indicates that the external device of the second electronic device is in working state; if the second pin signal is a high-level signal, the second working state of the external device of the second electronic device indicates that the external device of the second electronic device is in sleep state.

[0097] In some embodiments of the present application, the further step includes: obtaining a first signal from a first port of the first electronic device; and when the first signal is a low-level signal, indicating that the first port is in a connected state.

[0098] Based on the above embodiments, the present application specifically illustrates a control method: Fig. 9 The control method in the embodiment of the present application is shown in FIG. Figure 9 , applied to a first AIO device (corresponding to a first electronic device), the first AIO device is configured with a first HDMI port (corresponding to a first port).

[0099] like Fig.10 As shown, the first AIO device includes a central processor 1001, a scalar module 1002 and a first HDMI port 1003. Fig. 9The execution subject of the control method shown is the central processing unit 1001.

[0100] like Fig. 9 As shown, the control method includes the following steps S901 to S913.

[0101] Step S901: obtaining a first signal from a first HDMI port of a first AIO device.

[0102] Specifically, based on a communication port such as a display data channel / command interface (DDC / CI), a first signal of a first HDMI port is obtained through a scalar module.

[0103] Step S902: Determine whether the first signal is a low level signal.

[0104] If yes, execute step S903; if no, execute step S901.

[0105] Here, when the first signal is a low-level signal, it indicates that a connection line is inserted into the first HDMI port. When a connection line is inserted into the first HDMI port, the DDC / CI (I2C) path is first converted into a handshake mechanism of a dual-role port (DRP) for judgment and detection. In the DRP mode, the port can dynamically act as a host or a slave, depending on the needs of communication. The following steps S903 to S913 are multiple detection mechanisms.

[0106] Step S903: controlling the scalar module of the first AIO device to obtain the first voltage of the preset module.

[0107] The preset modules include but are not limited to a scalar module, a Wi-Fi module and an SSD module.

[0108] Step S904: Detecting a signal from a second HDMI port of a second AIO device connected to the first HDMI port, and if the first condition is met, obtaining a second voltage of a preset module of the second AIO device.

[0109] The first condition indicates that both connected devices are AIO devices.

[0110] Specifically, based on the communication port such as DDC / CI, the second voltage of the preset module of the second AIO device is obtained through the scalar module.

[0111] Step S905: if the first voltage is a power-on voltage and the second voltage is a power-off voltage, the first AIO device is controlled to be in a host mode and the second AIO device is controlled to be in a display mode.

[0112] The power-on voltage refers to the working voltage of the preset module of the first electronic device when it is powered on, and the power-off voltage refers to the working voltage of the preset module of the second electronic device when it is powered off.

[0113] Next, the CPU 1001 transmits the relevant video data to the scalar module 1002 based on Transition Minimized Differential Signaling (TMDS), and the scalar module 1002 transmits the relevant video data to the second HDMI port of the second AIO device through the first HDMI port 1003 based on TMDS for display.

[0114] Step S906: If the first voltage is the power-on voltage and the second voltage is the power-on voltage, the first AIO device is controlled to be in the host mode and the second AIO device is controlled to be in the host mode.

[0115] Step S907: obtaining a first connection signal of an external device of the first AIO device, and obtaining a second connection signal of an external device of the second AIO device through the communication port.

[0116] Step S908: If the first connection signal indicates that the first AIO device is connected to an external device and the second connection signal indicates that the second AIO device is not connected to an external device, the first AIO device is controlled to be a master device and the second AIO device is controlled to switch from a host mode to a display mode.

[0117] Step S909: If the first connection signal indicates that the first AIO device is not connected to an external device and the second connection signal indicates that the second AIO device is connected to an external device, the first AIO device is controlled to switch from the host mode to the display mode and the second AIO device is controlled to be in the host mode.

[0118] Step S910: If the first connection signal indicates that the first AIO device is connected to an external device, and the second connection signal indicates that the second AIO device is connected to an external device, the first AIO device is controlled to be in a host mode, and the second AIO device is controlled to be in a host mode.

[0119] Step S911: obtaining a first working state of an external device of the first AIO device, and obtaining a second working state of an external device of the second AIO device through a communication port.

[0120] Step S912: If the first working state indicates that the external device of the first AIO device is in working state, and the second working state indicates that the external device of the second AIO device is in sleep state, the first AIO device is controlled to be in display mode, and the second AIO device is controlled to be in display mode.

[0121] Step S913: If the first working state indicates that the external device of the first AIO device is in the sleep state, and the second working state indicates that the external device of the second AIO device is in the working state, the first AIO device is controlled to be in the display mode, and the second AIO device is controlled to be in the display mode.

[0122] In the embodiment of the present application, the first AIO device is controlled to be in a host mode, and the second AIO device is controlled to be in a display mode, or the first AIO device is controlled to be in a display mode, and the second AIO device is controlled to be in a host mode, that is, when the usage modes of the two AIO devices are inconsistent, both the first AIO device and the second AIO device can display normally.

[0123] In order to implement the method of the embodiment of the present application, based on the same inventive concept, a control device is also provided in the embodiment of the present application. Fig.11 Schematic diagram of the structure of the control device in the embodiment of the present application, which is applied to a first electronic device, such as Fig.11 As shown, the control device 110 includes:

[0124] The control unit 1101 is configured to, in response to obtaining that the first port of the first electronic device is in a connected state, control the processing module of the first electronic device to obtain a first target state corresponding to the first electronic device;

[0125] The control unit 1101 is further configured to control the first electronic device to be in a first usage mode when the first target state is in a first state;

[0126] The control unit 1101 is further configured to control the first electronic device to be in a second usage mode when the first target state is in a second state;

[0127] The first usage mode is different from the second usage mode.

[0128] In an embodiment of the present application, the usage mode of the first electronic device is controlled according to the first target state corresponding to the first electronic device. Correspondingly, the usage mode of the second electronic device can be controlled according to the second target state corresponding to the second electronic device. When the usage mode of the first electronic device is inconsistent with the usage mode of the second electronic device, both the first electronic device and the second electronic device can display normally.

[0129] In some embodiments of the present application, the control unit 1101 is further configured to detect a signal from a second port of a second electronic device connected to the first port, and obtain a second target state corresponding to the second electronic device at the first port when a first condition is met; wherein the first condition indicates that the first electronic device and the second electronic device belong to the same type of device;

[0130] When the first target state is in a first state and the second target state is in a second state, controlling the first electronic device to be in a first usage mode and controlling the second electronic device to be in a second usage mode;

[0131] When the first target state is in the second state and the second target state is in the first state, the first electronic device is controlled to be in the second usage mode, and the second electronic device is controlled to be in the first usage mode.

[0132] In some embodiments of the present application, the first target state includes a first voltage of a preset module of the first electronic device, and the second target state includes a second voltage of a preset module of the second electronic device; the control unit 1101 is further configured to control the first electronic device to be in a first state and control the second electronic device to be in a second state when the first voltage is a first preset value and the second voltage is a second preset value;

[0133] The first preset value is a voltage value of a preset module when the electronic device is powered on, and the second preset value is a voltage value of a preset module when the electronic device is powered off.

[0134] In some embodiments of the present application, the first target state further includes a first connection signal of an external device of the first electronic device, and the second target state includes a second connection signal of an external device of the second electronic device; the control unit 1101 is further configured to control the first electronic device to be in the first state and control the second electronic device to be in the first state when the first voltage is a first preset value and the second voltage is a first preset value;

[0135] When the first connection signal indicates that the first electronic device is connected to an external device, and the second connection signal indicates that the second electronic device is not connected to an external device, the first electronic device is controlled to be in a first state, and the second electronic device is controlled to switch from the first state to a second state.

[0136] In some embodiments of the present application, the control unit 1101 is further used to control the first electronic device to switch from the first state to the second state and control the second electronic device to be in the first state when the first connection signal indicates that the first electronic device is not connected to the external device and the second connection signal indicates that the second electronic device is connected to the external device.

[0137] In some embodiments of the present application, the first target state further includes a first working state of an external device of the first electronic device, and the second target state includes a second working state of an external device of the second electronic device; the control unit 1101 is further configured to control the first electronic device to be in the first state and the second electronic device to be in the first state when the first connection signal indicates that the first electronic device is connected to an external device and the second connection signal indicates that the second electronic device is connected to an external device;

[0138] When the first working state indicates that the external device of the first electronic device is in working state, and the second working state indicates that the external device of the second electronic device is in sleep state, the first electronic device is controlled to be in the first state, and the second electronic device is controlled to switch from the first state to the second state.

[0139] In some embodiments of the present application, the control unit 1101 is further used to control the first electronic device to switch from a first state to a second state and control the second electronic device to be in the first state when the first working state indicates that the external device of the first electronic device is in a sleep state and the second working state indicates that the external device of the second electronic device is in a working state.

[0140] In some embodiments of the present application, the control unit 1101 is further used to control the processing module of the first electronic device to obtain a first pin signal of an external device;

[0141] Acquire a second pin signal of an external device corresponding to the second electronic device at the first port;

[0142] Determine a first working state of an external device of the first electronic device based on the first pin signal;

[0143] A second working state of an external device of the second electronic device is determined based on the second pin signal.

[0144] In some embodiments of the present application, the control unit 1101 is further used to obtain a first signal from a first port of the first electronic device; when the first signal is a low-level signal, it indicates that the first port is in a connected state.

[0145] The present application also provides another electronic device, Fig.12 Schematic diagram of the structure of the electronic device in the embodiment of the present application. Fig.12 As shown, the electronic device 120 includes: a processor 1201 and a memory 1202 configured to store a computer program that can be run on the processor;

[0146] The processor 1201 is configured to execute the method steps in the aforementioned embodiment when running a computer program.

[0147] Of course, in practical applications, Fig.12 As shown, the components in the electronic device 120 are coupled together via a bus system 1203. It is understood that the bus system 1203 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 1203 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Fig.12 Various buses are labeled as bus system 1203.

[0148] In practical applications, the processor may be at least one of an application-specific integrated circuit (ASIC), a digital signal processing device (DSPD), a programmable logic device (PLD), a field-programmable gate array (FPGA), a controller, a microcontroller, and a microprocessor. It is understandable that for different devices, the electronic device used to implement the functions of the processor may also be other, and the embodiments of the present application do not specifically limit this.

[0149] The above-mentioned memory can be a volatile memory (volatile memory), such as a random access memory (RAM); or a non-volatile memory (non-volatile memory), such as a read-only memory (ROM), a flash memory, a hard disk (HDD) or a solid-state drive (SSD); or a combination of the above-mentioned types of memory, and provide instructions and data to the processor.

[0150] In an exemplary embodiment, the present application also provides a computer-readable storage medium for storing a computer program.

[0151] Optionally, the computer-readable storage medium can be applied to any one of the methods in the embodiments of the present application, and the computer program enables the computer to execute the corresponding processes implemented by the processor in each method in the embodiments of the present application. For the sake of brevity, they are not repeated here.

[0152] Illustratively, an embodiment of the present application further provides a computer program product, including a computer program, which can be executed by a processor of an electronic device to complete the steps of any of the aforementioned methods.

[0153] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some ports, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0154] The units described above as separate components may or may not be physically separated, and the components displayed 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 present embodiment.

[0155] In addition, all functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units. A person of ordinary skill in the art may understand that all or part of the steps of implementing the above method embodiments may be completed by hardware related to program instructions, and the above program may be stored in a computer-readable storage medium, which, when executed, executes the steps of the above method embodiments; and the above storage medium includes various media that can store program codes, such as mobile storage devices, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.

[0156] The methods disclosed in several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0157] The features disclosed in several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0158] The features disclosed in several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.

[0159] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A control method, applied to a first electronic device, comprising: In response to obtaining that the first port of the first electronic device is in a connected state, controlling a processing module of the first electronic device to obtain a first target state corresponding to the first electronic device; When the first target state is in a first state, controlling the first electronic device to be in a first usage mode; When the first target state is in a second state, controlling the first electronic device to be in a second usage mode; The first usage mode is different from the second usage mode.

2. The method according to claim 1, in response to obtaining that the first port of the first electronic device is in a connected state, further comprising: Detecting a signal from a second port of a second electronic device connected to the first port, and obtaining a second target state corresponding to the second electronic device at the first port if a first condition is met; wherein the first condition indicates that the first electronic device and the second electronic device belong to the same type of device; When the first target state is in the first state, controlling the first electronic device to be in the first usage mode includes: When the first target state is in a first state and the second target state is in a second state, controlling the first electronic device to be in a first usage mode and controlling the second electronic device to be in a second usage mode; When the first target state is in the second state, controlling the first electronic device to be in the second usage mode includes: When the first target state is in the second state and the second target state is in the first state, the first electronic device is controlled to be in the second usage mode, and the second electronic device is controlled to be in the first usage mode.

3. The method according to claim 2, wherein the first target state comprises a first voltage of a preset module of the first electronic device, and the second target state comprises a second voltage of a preset module of the second electronic device; further comprising: When the first voltage is a first preset value and the second voltage is a second preset value, controlling the first electronic device to be in a first state and controlling the second electronic device to be in a second state; The first preset value is a voltage value of a preset module when the electronic device is powered on, and the second preset value is a voltage value of a preset module when the electronic device is powered off.

4. The method according to claim 3, wherein the first target state further comprises a first connection signal of an external device of the first electronic device, and the second target state comprises a second connection signal of an external device of the second electronic device; and further comprising: When the first voltage is a first preset value and the second voltage is a first preset value, controlling the first electronic device to be in a first state and controlling the second electronic device to be in a first state; When the first connection signal indicates that the first electronic device is connected to an external device, and the second connection signal indicates that the second electronic device is not connected to an external device, the first electronic device is controlled to be in a first state, and the second electronic device is controlled to switch from the first state to a second state.

5. The method according to claim 4, further comprising: When the first connection signal indicates that the first electronic device is not connected to an external device, and the second connection signal indicates that the second electronic device is connected to an external device, the first electronic device is controlled to switch from a first state to a second state, and the second electronic device is controlled to be in the first state.

6. The method according to claim 4, wherein the first target state further comprises a first working state of an external device of the first electronic device, and the second target state comprises a second working state of an external device of the second electronic device; and further comprising: When the first connection signal indicates that the first electronic device is connected to an external device, and the second connection signal indicates that the second electronic device is connected to an external device, controlling the first electronic device to be in a first state and controlling the second electronic device to be in a second state; When the first working state indicates that the external device of the first electronic device is in working state, and the second working state indicates that the external device of the second electronic device is in sleep state, the first electronic device is controlled to be in the first state, and the second electronic device is controlled to switch from the first state to the second state.

7. The method according to claim 6, further comprising: When the first working state indicates that the external device of the first electronic device is in a sleep state, and the second working state indicates that the external device of the second electronic device is in a working state, the first electronic device is controlled to switch from the first state to the second state, and the second electronic device is controlled to be in the first state.

8. The method according to claim 6 or 7, further comprising: Controlling the processing module of the first electronic device to obtain a first pin signal of an external device; Acquire a second pin signal of an external device corresponding to the second electronic device at the first port; Determine a first working state of an external device of the first electronic device based on the first pin signal; A second working state of an external device of the second electronic device is determined based on the second pin signal.

9. The method according to any one of claims 1 to 7, further comprising: Obtaining a first signal from a first port of the first electronic device; When the first signal is a low level signal, it indicates that the first port is in a connected state.

10. A control device, applied to a first electronic device, comprising: a control unit, configured to, in response to obtaining that the first port of the first electronic device is in a connected state, control a processing module of the first electronic device to obtain a first target state corresponding to the first electronic device; The control unit is further configured to control the first electronic device to be in a first usage mode when the first target state is in a first state; The control unit is further configured to control the first electronic device to be in a second usage mode when the first target state is in a second state; The first usage mode is different from the second usage mode.