Control method, device and system and first electronic equipment
By detecting and switching the power supply line status, the external graphics card is restored to its initial state after power outage, solving the compatibility problem when reconnecting the external graphics card and improving user experience and performance.
Patent Information
- Application Number
- CN202411388776.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-10
AI Technical Summary
In the prior art, external graphics cards will not immediately enter the standby or uninitialized state after being disconnected from the host, resulting in compatibility problems that may occur during reconnection, affecting the graphics processing performance and user experience.
By detecting the connection between the first electronic device and the second electronic device, the power supply line state switching is controlled, the target module is restored from the power outage state to the power supply state, and the internal state information is cleared in the power supply state, and the communication link is re-established and the communication link is re-established. Configure parameters to ensure compatibility and performance.
It effectively avoids compatibility issues, ensures that external graphics cards can be correctly initialized when reconnecting, and improves user experience and system performance.
Smart Images

Figure CN119292966A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a control method, device, system and a first electronic device. Background Art
[0002] Currently, when an external module (i.e., a device or component independent of the host and used to expand or enhance the host's functions) has been powered on in advance through a physical connection device and is in a waiting state, if the physical connection device and the host are connected again at this time, the external module will not re-execute a series of power-on initialization processes due to the connection with the host, which may cause compatibility issues between the external module and the host. Summary of the invention
[0003] The technical solutions provided by this application are as follows:
[0004] The first aspect of the present application provides a control method, comprising:
[0005] Detecting that a connection is established between the first electronic device and the second electronic device, controlling a power supply circuit of the first electronic device to switch states so that a target module enters a power supply state after experiencing a power-off state; the power supply circuit is used to supply power to the target module;
[0006] When the target module enters a power supply state, a new communication link is established through the first electronic device and the second electronic device, and the new communication link is used for the second electronic device to configure the target module.
[0007] Before controlling the power supply line of the first electronic device to switch the state, the method further includes:
[0008] It is detected that the first electronic device has a target signal input from the second electronic device.
[0009] Detecting that the first electronic device has a target signal input from the second electronic device includes:
[0010] It is detected that the first electronic device has a power signal input from the second electronic device; the power signal is only used to power a functional module in the first electronic device; the functional module is used to assist in data transmission between the first electronic device and the second electronic device; the functional module is different from the target module.
[0011] Controlling the power supply circuit of the first electronic device to switch the state so that the target module enters the power supply state after experiencing the power-off state, includes:
[0012] The power supply circuit of the first electronic device is controlled to switch from a disabled state to an enabled state, so that the target module enters a powered state from a power-off state.
[0013] Controlling the power supply circuit of the first electronic device to switch the state so that the target module enters the power supply state after experiencing the power-off state, includes:
[0014] Controlling the power supply circuit of the first electronic device to switch from an enabled state to a disabled state, so that the target module switches from a powered state to a powered-off state;
[0015] The power supply circuit is controlled to be restored from a disabled state to an enabled state, so that the target module re-enters a power supply state from a power-off state.
[0016] The control method further comprises:
[0017] When it is detected that the first electronic device and the second electronic device are disconnected, the power supply circuit of the first electronic device is controlled to switch from an enabled state to a disabled state.
[0018] Another aspect of the present application provides a control device, comprising:
[0019] A control module is used to detect that a connection is established between a first electronic device and a second electronic device, and control the power supply circuit of the first electronic device to switch the state so that a target module enters a power supply state after experiencing a power-off state; the power supply circuit is used to supply power to the target module; when the target module enters the power supply state, a new communication link is established through the first electronic device and the second electronic device, and the new communication link is used to enable the second electronic device to configure the target module.
[0020] A third aspect of the present application provides a first electronic device, including:
[0021] A first connection interface, used to connect to a second electronic device;
[0022] A second connection interface, used to connect to a target module;
[0023] A power supply circuit, used to supply power to the target module;
[0024] A processor is used to detect that a connection is established between a first electronic device and a second electronic device, and control a power supply circuit of the first electronic device to switch states so that a target module enters a power supply state after experiencing a power-off state; the power supply circuit is used to supply power to the target module; when the target module enters the power supply state, a new communication link is established through the first electronic device and the second electronic device, and the new communication link is used to enable the second electronic device to configure the target module.
[0025] A fourth aspect of the present application provides a control system, comprising:
[0026] First electronic device;
[0027] a target module, wherein the target module is installed in the first electronic device;
[0028] a second electronic device;
[0029] The first electronic device is used to detect that a connection is established between the first electronic device and the second electronic device, and control the power supply circuit of the first electronic device to switch the state so that the target module enters the power supply state after experiencing the power-off state; the power supply circuit is used to supply power to the target module; when the target module enters the power supply state, a new communication link is established through the first electronic device and the second electronic device, and the new communication link is used to enable the second electronic device to configure the target module. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0031] Figure 1 A flow chart of a control method provided in Example 1 of the present application;
[0032] Figure 2 A state transition diagram provided for this application;
[0033] Figure 3 A flow chart of a control method provided in Example 2 of the present application;
[0034] Figure 4 A schematic diagram of an implementation scenario of a control method provided in this application;
[0035] Figure 5 A timing diagram of a target module provided in this application;
[0036] Figure 6 Another timing diagram of a target module provided in this application;
[0037] Figure 7 A flow chart of a control method provided in Example 3 of the present application;
[0038] Figure 8 A flow chart of a control method provided in Example 4 of the present application;
[0039] Fig. 9A schematic diagram of another implementation scenario of a control method provided in this application. DETAILED DESCRIPTION
[0040] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.
[0041] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0042] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0043] With the rapid development of computer technology, the demand for high-performance graphics processing is growing. As a solution to improve the graphics processing capabilities of notebooks or small hosts, external graphics cards (eGPU) have received widespread attention and application. As a popular external graphics card interface technology, Oculink docking has become an important bridge between external graphics cards and hosts with its high bandwidth and low latency.
[0044] However, in the prior art, Oculink docking usually adopts an independent power supply mode, that is, it can provide power to the graphics card without relying on the power supply of the host. Under such a design, since the external graphics card does not support hot plugging, when Oculink docking is disconnected from the host, the graphics card is still powered by the docking station, so it will maintain its current state, instead of immediately entering a standby or uninitialized state like a device that supports hot plugging. This means that even if the connection between the graphics card and the host has been disconnected, its internal status information (such as the configuration parameters of the graphics card configured by the last connected host, the data transmission rate of the transmission link between the graphics card and the last connected host, the transmission protocol version, the information of the last host, etc.) may not be immediately cleared or reset.
[0045] When docking and connecting to a new host, the external graphics card is already powered on, and the external graphics card will not re-execute the complete power-on initialization process, including: reset (i.e., restore the status information to the initial value), link training (LTSSM), driver loading and configuration, etc. This may cause the graphics card to interact with the new host in the residual old state, causing compatibility issues.
[0046] The direct consequence of this configuration conflict is that users may not be able to enjoy the expected high-performance graphics processing capabilities, and in the device manager of the operating system, a yellow exclamation mark indicating device identification or configuration errors may be observed. This not only affects the user experience, but may also have an adverse effect on the overall stability and performance of the system. Therefore, the present application provides a control method so that when an external graphics card is reconnected to the host, the initialization process can be correctly executed and appropriate configuration can be performed according to the configuration requirements of the new host to avoid compatibility problems and improve user experience.
[0047] The present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0048] Reference Figure 1 , is a flow chart of a control method provided in Example 1 of the present application, such as Figure 1 As shown, the method may include but is not limited to the following steps:
[0049] Step S101: Detecting that a connection is established between a first electronic device and a second electronic device, controlling a power supply circuit of the first electronic device to switch state so that a target module enters a power supply state after a power-off state; the power supply circuit is used to supply power to the target module.
[0050] The first electronic device may have an autonomous power supply capability, which means that even when not connected to the second electronic device, the first electronic device can remain powered as long as it is connected to another reliable power source (such as a power adapter or a battery).
[0051] In this embodiment, the target module is not a built-in part of the second electronic device, but exists as an external module for enhancing or supplementing the functions of the second electronic device.
[0052] The target module can be installed inside the first electronic device through a specific interface or slot. A power supply line can be set in the first electronic device to supply power to the target module. That is, the power supply of the target module is also independent of the second electronic device.
[0053] When it is detected that a connection is established between the first electronic device and the second electronic device, the first electronic device may control the power supply line to switch the state so that the target module enters the power supply state after power failure.
[0054] The target module may not maintain its current state after power failure, so the state information inside the target module may be cleared or reset. For example, the state information of the target module may be stored in a register of the target module, and the register is a volatile memory. After the target module is powered off, the state information in the register will be lost, which means that the state information inside the target module is cleared.
[0055] The state information cleared or reset inside the target module may include, but is not limited to: at least one of: state information of the target module at the communication link level and configuration parameters for configuring the functions of the target module.
[0056] Step S102: When the target module enters a power supply state, a new communication link is established through the first electronic device and the second electronic device, and the new communication link is used for the second electronic device to configure the target module.
[0057] When the target module enters the power-on state, since the state information inside the target module has been cleared before, when entering the power-on state, the state information inside the target module can be regarded as restored to the initial value. The target module can perform a subsequent series of initialization processes on the basis of restoring the state information inside the target module to the initial value. The subsequent series of initialization processes may include: establishing a new communication link through the first electronic device and the second electronic device. After establishing the new communication link, the second electronic device can load the driver program of the target module (which can be used to translate the instructions of the second electronic device into signals that the target module can understand, and can also control the functions of the target module). After the driver program of the target module is successfully loaded, the second electronic device can load the configuration parameters of the target module, and use the loaded driver program to transmit the configuration parameters of the second electronic device to the target module through the new communication link, so that the target module is configured based on the configuration parameters, etc.
[0058] For example, the target module may be a PCIe component, that is, a component that uses the PCIe (Peripheral Component Interconnect Express) protocol. When the internal status information of the PCIe component is restored to the initial value, steps such as LTSSM (Link Training and Status State Machine) (that is, an implementation method for establishing a new communication link), loading a driver, and transmitting configuration parameters may be performed.
[0059] LTSSM may consist of multiple states, including Detect, Polling, Configuration, L0, L0s, L1, L2, Recovery, Loopback, Disable, and Hot Reset, etc. When the PCIe component and the first electronic device establish a connection, LTSSM starts from the Detect state, gradually passes through the Polling, Configuration, and other states, and finally enters the L0 state, indicating that the link is ready for data transmission.
[0060] In this embodiment, by detecting that a connection is established between the first electronic device and the second electronic device, the power supply line of the first electronic device is controlled to switch the state so that the target module enters the power supply state after experiencing the power-off state, so that the target module does not maintain its current state after experiencing the power-off state, and therefore, the state information inside the target module can be cleared. When the target module enters the power supply state, since the state information inside the target module has been cleared before, when entering the power supply state, the state information inside the target module can be regarded as restored to the initial value. On this basis, there is no problem of inconsistent state information at the communication link level between the target module and the second electronic device, and it can be ensured that a new communication link can be established through the first electronic device and the second electronic device to ensure that the configuration parameters transmitted through the new communication link can be correctly parsed by the target module, and then the target module can be configured with the configuration parameters transmitted by the new communication link in the state where its configuration parameters have been restored to the initial values, which can ensure that the target module is correctly configured to avoid compatibility issues and improve user experience.
[0061] For example, in the case where the target module is a PCIe component, by detecting that a connection is established between a first electronic device and a second electronic device (host), the power supply line of the first electronic device is controlled to perform state switching so that the PCIe component enters a power supply state after experiencing a power-off state. The PCIe component can be made to not maintain its current state after experiencing a power-off state, so that the LTSSM state information related to the previous connection inside the PCIe component and any possible remaining configuration parameters of the PCIe component can be cleared. When the PCIe component enters the power-on state, since the LTSSM status information inside the PCIe component has been cleared, therefore, when entering the power-on state, the LTSSM status information inside the PCIe component can be regarded as restored to the initial value. On this basis, there is no problem of inconsistency in LTSSM status information between the PCIe component and the second electronic device, and LTSSM link training can be smoothly performed to ensure that a new communication link can be established through the first electronic device and the second electronic device to ensure that the configuration parameters transmitted through the new communication link can be correctly parsed by the PCIe component. Then, the PCIe component can be configured with the configuration parameters transmitted by the new communication link after the configuration parameters previously used to configure the function of the PCIe component are cleared, which can ensure that the PCIe component is correctly configured to avoid compatibility issues and improve user experience.
[0062] If the first electronic device is connected to a new electronic device (e.g., the second electronic device), the PCIe component directly attempts to establish a connection with the new electronic device without powering off, that is, during the link training process, it may jump back to the detect state from the Polling, Configuration, L0, etc. state to retry, for example, Figure 2 As described above, in the Polling state, if the necessary locking or configuration is not completed within the preset time limit during the Polling process, the system may consider the link unavailable and jump back to the Detect state for retry; in the Configuration state, if the devices at both ends of the link cannot reach an agreement on certain parameters during the configuration process, such as link width, channel arrangement, etc., it may cause configuration failure and jump back to the Detect state; in the L0 state, if the link is suddenly interrupted in the L0 state (such as physical connection disconnection), the system may detect this change and jump back to the Detect state to re-establish the link.
[0063] However, the link is not necessarily guaranteed to be normal after the retry. On the contrary, the present embodiment detects the establishment of a connection between the first electronic device and the second electronic device, controls the power supply line of the first electronic device to perform state switching, so that the target module enters the power supply state after experiencing the power-off state. This is to enable the target module to be powered on again from the hardware control perspective, clear the previous connection status information, and re-follow the second electronic device for link training and configuration.
[0064] As another optional embodiment of the present application, refer to Figure 3 , is a flow chart of a control method provided in Example 2 of the present application, such as Figure 3 As shown, the method may include but is not limited to the following steps:
[0065] Step S201, detecting that a connection is established between a first electronic device and a second electronic device, and detecting that a target signal of the second electronic device is input to the first electronic device, controlling a power supply circuit of the first electronic device to switch states so that a target module enters a power supply state after experiencing a power-off state; the power supply circuit is used to supply power to the target module.
[0066] The target signal of the second electronic device may be one or more signals between the first electronic device and the second electronic device.
[0067] The target signal may have the following property: it does not need to maintain a specific time relationship with any other signal or event. The target signal has this property so that the first electronic device can use the target signal at any time without being synchronized with any operation or signal of the second electronic device.
[0068] The detailed process of controlling the power supply circuit of the first electronic device to switch the state so that the target module enters the power supply state after experiencing the power-off state can be referred to the relevant introduction in Example 1, which will not be repeated here.
[0069] Step S202: When the target module enters a power supply state, a new communication link is established through the first electronic device and the second electronic device, and the new communication link is used for the second electronic device to configure the target module.
[0070] The detailed process of step S202 can refer to the relevant introduction of step S102 in embodiment 1, which will not be repeated here.
[0071] In this embodiment, by introducing the detection of the target signal as a necessary condition for switching the power supply state, the power supply state switching caused by misoperation or external factors (such as an unintentional connection) can be significantly reduced.
[0072] Moreover, when the first electronic device receives the target signal, it may represent that the second electronic device is in a relatively stable state. The first electronic device then controls the power supply circuit of the first electronic device to switch the state, so that the target module enters the power supply state after experiencing the power-off state, so that the target module can stably follow the reconfiguration of the second electronic device to ensure the accuracy of the configuration.
[0073] As another optional embodiment of the present application, a control method is provided in Embodiment 3 of the present application. This embodiment is mainly an implementation method for detecting that a target signal input of a second electronic device is detected in Embodiment 2. Detecting that a target signal input of a second electronic device is detected in the first electronic device may include but is not limited to:
[0074] It is detected that the first electronic device has a power signal input from the second electronic device.
[0075] The power signal is only used to supply power to the functional modules in the first electronic device. The power signal is not used to provide power to the entire first electronic device, but is a dedicated power supply for a specific functional module.
[0076] The power signal has the property that it does not need to maintain a specific time relationship with any other signal or event. The power signal has this property so that the first electronic device can use the power signal at any time without being synchronized with any operation or signal of the second electronic device.
[0077] In this embodiment, the power signal is not only used for power supply, but also regarded as a trigger signal by the first electronic device, that is, when the power signal input is detected, the power supply circuit of the first electronic device is controlled to switch the state so that the target module enters the power supply state after experiencing the power-off state. If the power signal input is not detected, the power supply circuit of the first electronic device will not be controlled to switch the state so that the target module enters the power supply state after experiencing the power-off state.
[0078] The first electronic device and the second electronic device can be connected through a transmission line, and the transmission line can be used to transmit data signals and power signals. The first electronic device is provided with a first interface, and the second electronic device is provided with a second interface, and the first interface and the second interface are used to access the transmission line. The power signal can be a power signal between at least one first pin in the first interface of the first electronic device and at least one second pin in the second interface of the second electronic device. Among them, the first pin and the second pin are designed separately, and there is no synchronization requirement, so that the power signal can have the property of not needing to maintain a specific time relationship with any other signal or event. The power signal has this property, which enables the first electronic device to use this power signal at any time without being synchronized with any operation or signal of the second electronic device.
[0079] For example, the first electronic device may be an Oculink docking, and the second electronic device may be a host, such as Figure 4 As shown, pin A1 of the Oculink docking can be connected to pin A1 of the host, and pin B21 of the Oculink docking can be connected to pin B21 of the host, and the power signal between the two pairs of pins is 3.3V, which can be expressed as 3VS_Oculink.
[0080] Pin A21 of the Oculink docking can be connected to pin A21 of the host, and pin B1 of the Oculink docking can be connected to pin B1 of the host. The power signal between the two pairs of pins is 5V, which can be expressed as 5VS_Oculink.
[0081] Either 3VS_Oculink or 5VS_Oculink can be used as the target signal.
[0082] The function module is used to assist in data transmission between the first electronic device and the second electronic device; the function module is different from the target module.
[0083] In this embodiment, by introducing the detection of the input power signal of the second electronic device as a necessary condition for switching the power state, the power state switching caused by misoperation or external factors (such as an inadvertently established connection) can be significantly reduced.
[0084] Furthermore, when the first electronic device detects the power signal input from the second electronic device, it can represent that the second electronic device is in a relatively stable state, and the power signal can serve as a trigger signal, which can enable the first electronic device to control the power supply line of the first electronic device to switch the state, so that the target module enters the power supply state after experiencing the power-off state, and the target module can stably follow the reconfiguration of the second electronic device to ensure the accuracy of the configuration.
[0085] Next, the control method provided by this embodiment is described by comparing the timing of the target module. For example, the power supply and power-off logic of the Oculink docking to the target module can be that the Oculink docking will not detect the input of 3VS_Oculink or 5VS_Oculink, and the target module will be powered on following the Oculink docking. If the Oculink docking is not powered off, the target module will not be powered off. Figure 5As shown, the power-on logic is synchronized with docking (i.e., Oculink docking), the power-on and power-off states of the target module are not synchronized with the 3.3V or 5V power signal, and the power supply timing of the target module corresponding to the 3.3V or 5V power signal does not change.
[0086] If the target module is powered by the Oculink docking and is in the powered-on state before the host is connected to the Oculink docking, the internal status information of the target module will not be cleared when the host is connected to the docking, that is, the reset operation before LTSSM is not performed. Figure 5 As shown, the initialization reset signal does not change due to the access of the host.
[0087] If the target module is powered by the Oculink docking and is in the power-on state before the host connects to the Oculink docking, and the detect state of the LTSSM is already in the ready state, when the host connects to the Oculink docking, the detect state of the LTSSM will be immediately recognized and utilized without re-entering the detection process of the detect state. In this case, the timing performance of the target module is as follows Figure 5 As shown, the LTSSM state is already in the ready state.
[0088] In the control method provided in this embodiment, Oculink docking can detect the input of 3VS_Oculink or 5VS_Oculink. If Oculink docking detects that a connection is established between the first electronic device and the second electronic device, and detects the input of 3VS_Oculink or 5VS_Oculink of the host, the power supply line of Oculink docking can be controlled to switch the state, so that the target module enters the power supply state after the power-off state. The performance of the timing of the target module is as follows: Figure 6 As shown, the power-on logic is synchronized with the host side, the power-on and power-off states of the target module are synchronized with the 3.3V or 5V power signal. When the 3.3V or 5V power signal input is not detected, Oculink docking will not control the power supply line of the first electronic device to switch the state, and the target module is in a power-off state (if the target module is already in a power-off state before connecting to a new host). When the 3.3V or 5V power signal input is detected, Oculink docking controls the power supply line of the first electronic device to switch the state, and the target module will switch from a power-off state to a power-on state.
[0089] The target module may not maintain its current state after power failure, so the state information inside the target module may be cleared. That is, when the host is connected to the Oculink docking, the reset operation before LTSSM is performed. The timing of the target module is as follows Figure 6 As shown, the initialization reset signal changes due to the access of the host, and the accessed host is powered on and initialized again.
[0090] The state information inside the target module has been cleared, that is, the state information inside the target module is restored to the initial value, and then LTSSM is performed. In this case, the timing performance of the target module is as follows Figure 6 As shown, target modules such as LTSSM are switched from a power-off state to a power-on state and then start execution.
[0091] As another optional embodiment of the present application, refer to Figure 7 , is a flow chart of a control method provided in Example 3 of the present application. This example is mainly an implementation method of step S101 in Example 1. Figure 7 As shown, step S101 may include but is not limited to the following steps:
[0092] Step S1011: Detecting that a connection is established between the first electronic device and the second electronic device, controlling the power supply circuit of the first electronic device to switch from a disabled state to an enabled state, so that the target module enters a powered state from a powered-off state.
[0093] In this embodiment, although the first electronic device is independently powered, the power supply state of the target module may not be directly affected by the power supply state of the first electronic device. That is, even if the first electronic device is powered, the target module may still be powered off.
[0094] When the first electronic device is in a power-on state, if the target module enters a power-off state, the state information inside the target module may be cleared.
[0095] When the first electronic device is in a powered state and the target module is in a powered-off state, if it is detected that a connection is established between the first electronic device and the second electronic device, the power supply circuit of the first electronic device can be controlled to switch from a disabled state to an enabled state, so that the target module enters a powered state from a powered-off state.
[0096] In this embodiment, by detecting that a connection is established between the first electronic device and the second electronic device, the power supply line of the first electronic device is controlled to switch state, so that the target module enters the power supply state from the power-off state, that is, the target module enters the power supply state on the basis of having cleared its internal state information. When the target module enters the power supply state, since the internal state information of the target module has been cleared before, when entering the power supply state, the internal state information of the target module can be regarded as restored to the initial value. On this basis, there is no problem of inconsistent state information at the communication link level between the target module and the second electronic device, and it can be ensured that a new communication link can be established through the first electronic device and the second electronic device to ensure that the configuration parameters transmitted through the new communication link can be correctly parsed by the target module, and then the target module can be configured with the configuration parameters transmitted by the new communication link in the state where its configuration parameters have been restored to the initial value, which can ensure that the target module is correctly configured to avoid compatibility issues and improve user experience.
[0097] As another optional embodiment of the present application, refer to Figure 8 , is a flow chart of a control method provided in Example 4 of the present application. This example is mainly an implementation method of step S101 in Example 1. Figure 8 As shown, step S101 may include but is not limited to the following steps:
[0098] Step S1012: Detecting that a connection is established between the first electronic device and the second electronic device, controlling the power supply circuit of the first electronic device to switch from an enabled state to a disabled state, so that the target module switches from a powered state to a powered-off state.
[0099] In this embodiment, when the first electronic device is independently powered, the power state of the target module can be directly affected by the power state of the first electronic device, that is, the target module is powered on when the first electronic device is powered on, and the target module is powered off when the first electronic device is powered off.
[0100] When the first electronic device is in a powered state and the target module is in a powered state, if it is detected that a connection is established between the first electronic device and the second electronic device, the power supply circuit of the first electronic device can be controlled to switch from an enabled state to a disabled state, so that the target module is switched from a powered state to a powered-off state.
[0101] When the target module is switched from a powered state to a powered-off state, the state information inside the target module may be cleared.
[0102] Step S1013: Control the power supply circuit to recover from the disabled state to the enabled state, so that the target module can re-enter the power supply state from the power-off state.
[0103] When the target module re-enters the power supply state, since the state information inside the target module has been cleared before, the state information inside the target module can be considered to be restored to the initial value when the power supply state is re-entered. The target module can perform a series of subsequent initialization processes based on restoring the state information inside the target module to the initial value.
[0104] In this embodiment, by detecting that a connection is established between the first electronic device and the second electronic device, the power supply circuit of the first electronic device is controlled to switch from an enabled state to a disabled state, so that the target module is switched from a powered state to a powered-off state. When the target module is in a powered-off state, its internal state information is automatically cleared due to power loss. When it is necessary to restore the function of the target module, the power supply circuit can be controlled to restore from a disabled state to an enabled state, so that the target module re-enters a powered state from a powered-off state.
[0105] When the target module enters the power-on state, since the internal status information of the target module has been cleared before, when entering the power-on state, the internal status information of the target module can be regarded as restored to the initial value. On this basis, there is no problem of inconsistency in status information at the communication link level between the target module and the second electronic device, and it can be ensured that a new communication link can be established through the first electronic device and the second electronic device to ensure that the configuration parameters transmitted through the new communication link can be correctly parsed by the target module, and then the target module can be configured with the configuration parameters transmitted by the new communication link in the state where its configuration parameters have been restored to the initial values, which can ensure that the target module is correctly configured to avoid compatibility issues and improve user experience.
[0106] As another optional embodiment of the present application, refer to Figure 8 , is a flow chart of a control method provided in Example 5 of the present application, such as Figure 8 As shown, the method may include but is not limited to the following steps:
[0107] Step S301: Detecting that a connection is established between a first electronic device and a second electronic device, controlling a power supply circuit of the first electronic device to switch from a disabled state to an enabled state, so that a target module enters a powered state from a powered-off state.
[0108] The detailed process of step S301 can refer to the relevant introduction of step S1011 in embodiment 3, which will not be repeated here.
[0109] Step S302: When the target module enters a power supply state, a new communication link is established through the first electronic device and the second electronic device, and the new communication link is used for the second electronic device to configure the target module.
[0110] The detailed process of step S302 can refer to the relevant introduction of step S102 in embodiment 1, which will not be repeated here.
[0111] Step S303: When it is detected that the first electronic device and the second electronic device are disconnected, control the power supply circuit of the first electronic device to switch from an enabled state to a disabled state.
[0112] In this embodiment, as mentioned above, the first electronic device is independently powered, but the power supply state of the target module may not be directly affected by the power supply state of the first electronic device. That is, even if the first electronic device is powered, the target module may still be powered off.
[0113] When it is detected that the connection between the first electronic device and the second electronic device is disconnected, the control logic may be triggered again, that is, the power supply circuit of the first electronic device is controlled to switch from an enabled state to a disabled state, so that the target module enters a power-off state again.
[0114] When the target module re-enters the power-off state, its internal status information will be automatically cleared due to the power loss, so that the target module waits to be awakened next time in the state where its internal status information has been cleared.
[0115] As another optional embodiment of the present application, a control method is provided for Embodiment 6 of the present application. This embodiment is mainly an implementation method of the target module in Embodiment 1. The target module may include but is not limited to: target hardware that assists the second electronic device in performing the target processing function.
[0116] For example, the target hardware may be a graphics card that assists the second electronic device in performing image processing functions, an external network card or router that performs data connection, or an audio component that assists the second electronic device in performing audio processing functions.
[0117] The target hardware can be installed inside the first electronic device through a specific interface or slot. Fig. 9 As shown, the first electronic device can be connected to the second electronic device via a transmission line.
[0118] The transmission line, as a physical medium, is responsible for establishing a transmission channel for electrical signals between the first electronic device and the second electronic device. When the second electronic device sends a target signal to the first electronic device through the transmission line, the signal is recognized by the first electronic device and used as a trigger condition to control the power supply state switching of the target hardware.
[0119] When the target module enters a power supply state, a new communication link is established through the first electronic device and the second electronic device.
[0120] The new communication link is a logical connection established between the first electronic device and the second electronic device after the target hardware enters the power supply state. The configuration parameters of the target hardware from the second electronic device can be transmitted to the target hardware through the new communication link, so that the target hardware is configured based on the configuration parameters.
[0121] Next, the control device provided in the present application is introduced. The control device introduced below and the control method introduced above can be referred to accordingly.
[0122] The control device may include a control module.
[0123] A control module is used to detect that a connection is established between a first electronic device and a second electronic device, and control the power supply circuit of the first electronic device to switch the state so that a target module enters a power supply state after experiencing a power-off state; the power supply circuit is used to supply power to the target module; when the target module enters the power supply state, a new communication link is established through the first electronic device and the second electronic device, and the new communication link is used to enable the second electronic device to configure the target module.
[0124] The control module can also be used to detect that a connection is established between a first electronic device and a second electronic device, and, upon detecting that the first electronic device has a target signal input from the second electronic device, control the power supply circuit of the first electronic device to switch states so that the target module enters a power supply state after experiencing a power-off state; the power supply circuit is used to supply power to the target module.
[0125] The control module detects that the target signal of the second electronic device is input to the first electronic device, which may include:
[0126] It is detected that the first electronic device has a power signal input from the second electronic device; the power signal is only used to power a functional module in the first electronic device; the functional module is used to assist in data transmission between the first electronic device and the second electronic device; the functional module is different from the target module.
[0127] The control module controls the power supply circuit of the first electronic device to switch the state so that the target module enters the power supply state after experiencing the power-off state, which may include:
[0128] The power supply circuit of the first electronic device is controlled to switch from a disabled state to an enabled state, so that the target module enters a powered state from a power-off state.
[0129] The control module controls the power supply circuit of the first electronic device to switch the state so that the target module enters the power supply state after experiencing the power-off state, including:
[0130] Controlling the power supply circuit of the first electronic device to switch from an enabled state to a disabled state, so that the target module switches from a powered state to a powered-off state;
[0131] The power supply circuit is controlled to be restored from a disabled state to an enabled state, so that the target module re-enters a power supply state from a power-off state.
[0132] The control module may also be configured to control the power supply circuit of the first electronic device to switch from an enabled state to a disabled state when it is detected that the first electronic device and the second electronic device are disconnected.
[0133] The target module may include: target hardware that assists the second electronic device in executing a target processing function.
[0134] In another embodiment of the present application, a first electronic device is provided.
[0135] The first electronic device may include:
[0136] A first connection interface, used to connect to a second electronic device;
[0137] A second connection interface, used to connect to a target module;
[0138] A power supply circuit, used to supply power to the target module;
[0139] A processor is used to detect that a connection is established between a first electronic device and a second electronic device, and control a power supply circuit of the first electronic device to switch states so that a target module enters a power supply state after experiencing a power-off state; the power supply circuit is used to supply power to the target module; when the target module enters the power supply state, a new communication link is established through the first electronic device and the second electronic device, and the new communication link is used to enable the second electronic device to configure the target module.
[0140] In another embodiment of the present application, a control system is provided.
[0141] Control systems may include:
[0142] First electronic device;
[0143] a target module, wherein the target module is installed in the first electronic device;
[0144] a second electronic device;
[0145] The first electronic device is used to detect that a connection is established between the first electronic device and the second electronic device, and control the power supply circuit of the first electronic device to switch the state so that the target module enters the power supply state after experiencing the power-off state; the power supply circuit is used to supply power to the target module; when the target module enters the power supply state, a new communication link is established through the first electronic device and the second electronic device, and the new communication link is used to enable the second electronic device to configure the target module.
[0146] It should also be noted that the device embodiments described above are merely schematic, wherein the units described 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 they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
[0147] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0148] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0149] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
Claims
1. A control method, comprising: Detecting that a connection is established between the first electronic device and the second electronic device, controlling a power supply circuit of the first electronic device to switch states so that a target module enters a power supply state after experiencing a power-off state; the power supply circuit is used to supply power to the target module; When the target module enters a power supply state, a new communication link is established through the first electronic device and the second electronic device, and the new communication link is used for the second electronic device to configure the target module.
2. The control method according to claim 1, before controlling the power supply line of the first electronic device to switch the state, further comprising: It is detected that the first electronic device has a target signal input from the second electronic device.
3. The control method according to claim 2, wherein detecting that the first electronic device has a target signal input from the second electronic device comprises: Detecting that the first electronic device has a power signal input from the second electronic device; The power signal is only used to supply power to the functional modules in the first electronic device; The functional module is used to assist in data transmission between the first electronic device and the second electronic device; the functional module is different from the target module.
4. The control method according to claim 1, controlling the power supply circuit of the first electronic device to switch the state so that the target module enters the power supply state after experiencing the power-off state, comprising: The power supply circuit of the first electronic device is controlled to switch from a disabled state to an enabled state, so that the target module enters a powered state from a power-off state.
5. The control method according to claim 1, controlling the power supply circuit of the first electronic device to switch the state so that the target module enters the power supply state after experiencing the power-off state, comprising: Controlling the power supply circuit of the first electronic device to switch from an enabled state to a disabled state, so that the target module switches from a powered state to a powered-off state; The power supply circuit is controlled to be restored from a disabled state to an enabled state, so that the target module re-enters a power supply state from a power-off state.
6. The control method according to claim 4, further comprising: When it is detected that the first electronic device and the second electronic device are disconnected, the power supply circuit of the first electronic device is controlled to switch from an enabled state to a disabled state.
7. The control method according to claim 1, wherein the target module comprises: Target hardware assisting the second electronic device in executing a target processing function.
8. A control device comprising: A control module is used to detect that a connection is established between a first electronic device and a second electronic device, and control the power supply circuit of the first electronic device to switch the state so that a target module enters a power supply state after experiencing a power-off state; the power supply circuit is used to supply power to the target module; when the target module enters the power supply state, a new communication link is established through the first electronic device and the second electronic device, and the new communication link is used to enable the second electronic device to configure the target module.
9. A first electronic device, comprising: A first connection interface, used to connect to a second electronic device; A second connection interface, used to connect to a target module; A power supply circuit, used to supply power to the target module; A processor is used to detect that a connection is established between a first electronic device and a second electronic device, and control a power supply circuit of the first electronic device to switch states so that a target module enters a power supply state after experiencing a power-off state; the power supply circuit is used to supply power to the target module; when the target module enters the power supply state, a new communication link is established through the first electronic device and the second electronic device, and the new communication link is used to enable the second electronic device to configure the target module.
10. A control system comprising: First electronic device; a target module, wherein the target module is installed in the first electronic device; a second electronic device; The first electronic device is used to detect that a connection is established between the first electronic device and the second electronic device, and control the power supply circuit of the first electronic device to switch the state so that the target module enters the power supply state after experiencing the power-off state; the power supply circuit is used to supply power to the target module; when the target module enters the power supply state, a new communication link is established through the first electronic device and the second electronic device, and the new communication link is used to enable the second electronic device to configure the target module.