Equipment control method and device, terminal equipment and computer readable storage medium

By setting the main system power connection in the microcontroller's off-state state in the electronic device and reconnecting it after receiving the power-on signal, the problem of standby power consumption of the device is solved, and the functions of low-energy shutdown and normal power-on are realized.

CN121857950APending Publication Date: 2026-04-14HUIZHOU TCL MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUIZHOU TCL MOBILE COMM CO LTD
Filing Date
2025-12-15
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing electronic devices still require standby power even when powered off, resulting in power loss, which is particularly noticeable in portable devices and affects battery life.

Method used

By setting a microcontroller in the terminal device, the main system is disconnected from the power supply in the power-off state, and then reconnected after receiving the power-on signal to ensure normal device power-on. The power supply status is controlled by power conversion devices and pins.

Benefits of technology

It reduces energy consumption during device shutdown, ensures that the device can be turned on normally after receiving the power-on signal, and improves battery life and endurance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121857950A_ABST
    Figure CN121857950A_ABST
Patent Text Reader

Abstract

The invention discloses an equipment control method and device, terminal equipment and a computer readable storage medium, the method is applied to a microcontroller of the terminal equipment, the terminal equipment further comprises a power source and a main system, the power source is used for supplying power to the microcontroller and the main system, and the method comprises the steps that when it is determined that the main system is in a shutdown state, the microcontroller is powered on; disconnecting the main system from the power supply; and after the starting signal is received, the main system is controlled to be connected with the power supply. By adopting the method provided by the invention, the main system can be disconnected from the power supply after the main system is shut down, so that the energy consumption during the shutdown period of the terminal equipment is reduced, and the main system can be supplied with power after the startup signal is received, so that the normal startup of the terminal equipment is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic equipment, specifically to a device control method, apparatus, terminal equipment, and computer-readable storage medium. Background Technology

[0002] In current electronic devices, to ensure rapid response to infrared remote control signals or physical button operations even when the device is powered off, a "standby power-on" design is commonly used. Taking projectors as an example, when a user performs a power-off operation through the UI, the standby power supply, specifically designed for standby functionality, continues to run. Even when the device is in a state perceived as "completely off" by the user, the standby power supply still needs to continuously power the main system and other components in standby mode, resulting in significant power loss for battery-powered devices (such as portable projectors and smart speakers) during long-term storage. Summary of the Invention

[0003] This application provides a device control method, apparatus, terminal device, and computer-readable storage medium, which can disconnect the main system from the power supply after the main system is powered off, reducing the energy consumption of the terminal device during the power-off period, and can also supply power to the main system after receiving a power-on signal to ensure that the terminal device can be powered on normally.

[0004] The technical solution adopted by this invention to solve the problem is as follows: On one hand, this application provides a device control method applied to a microcontroller in a terminal device. The terminal device also includes a power supply and a main system. The power supply provides power to the microcontroller and the main system. The device control method includes: When the main system is confirmed to be powered off, disconnect the main system from the power supply. Upon receiving the power-on signal, the main control system connects to the power supply.

[0005] In some embodiments of this application, the terminal device further includes a power conversion device, through which the power supply is connected to the main system, and the microcontroller includes a first pin, which is connected to the enable pin of the power conversion device; Disconnect the main system from the power supply, including: The first control pin outputs a first level signal to keep the power conversion device in the off state; Controlling the main system's connection to the power supply, including: The first control pin outputs a second-level signal to enable the power conversion device to operate.

[0006] In some embodiments of this application, the terminal device further includes an infrared receiver and a power button, and the microcontroller further includes a second pin and a third pin, wherein the second pin is connected to the infrared receiver and the third pin is connected to the power button; After receiving the power-on signal, the process before the main control system connects to the power supply includes: Obtain the level signal of the second pin and the level signal of the third pin; Based on the level signals of the second and third pins, determine whether a power-on signal has been received.

[0007] In some embodiments of this application, determining whether a power-on signal has been received is based on the level signals of the second pin and the third pin, including: When the level signal of the second pin is the third level signal, or the level signal of the third pin is the fourth level signal, it is determined that a power-on signal has been received; If the level signal of the second pin is not the third level signal and the level signal of the third pin is not the fourth level signal, it is determined that no power-on signal has been received.

[0008] In some embodiments of this application, the microcontroller further includes a fourth pin, which is connected to the main system; Before disconnecting the main system from the power supply when it is determined that the main system is in a powered-off state, the following steps are included: Obtain the level signal of the fourth pin; The system determines whether it is powered off based on the level signal of the fourth pin.

[0009] In some embodiments of this application, the determination of whether the main system is in a power-off state is based on the level signal of the fourth pin, including: When the level signal on the fourth pin is the fifth level signal, it is determined that the main system is in a power-off state; When the level signal on the fourth pin is the sixth level signal, it is determined that the main system is not in a power-off state.

[0010] In a second aspect, embodiments of the present invention also provide a device control apparatus, which is applied to a microcontroller in a terminal device. The terminal device further includes a power supply and a main system. The power supply is used to supply power to the microcontroller and the main system. The device control apparatus includes: The power shutdown module is used to disconnect the main system from the power supply when it is determined that the main system is in a power-off state; The power connection module is used to control the connection between the main system and the power supply after receiving a power-on signal.

[0011] Thirdly, this application also provides a terminal device, which includes: The microcontroller, power supply, and main system are provided, wherein the power supply provides power to the microcontroller and the main system, and the microcontroller is configured to perform the device control method of any of the first aspects.

[0012] In some embodiments of this application, the terminal device further includes a power conversion device, through which the power supply is connected to the main system. A first pin of the microcontroller is connected to the enable pin of the power conversion device, and the microcontroller controls the switching on and off of the power conversion device based on the level signal output by the first pin.

[0013] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, the computer program being loaded by a processor to perform the steps of the device control method of any of the first aspects.

[0014] The beneficial effects of this invention are as follows: By setting a microcontroller in the terminal device, the microcontroller disconnects the main system from the power supply when it determines that the main system is in a power-off state; after receiving a power-on signal, it controls the main system to connect to the power supply. This can disconnect the main system from the power supply after the main system is powered off, reducing the energy consumption of the terminal device during power-off. It can also supply power to the main system after receiving a power-on signal, ensuring that the terminal device can be powered on normally. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 This is a schematic diagram of a scenario for the equipment control system provided in an embodiment of the present invention; Figure 2 This is a flowchart illustrating one embodiment of the device control method provided in this invention. Figure 3 This is a schematic diagram of a specific embodiment of a circuit for controlling a device provided in this invention. Figure 4 This is a flowchart illustrating a specific embodiment of the device control method provided in this invention. Figure 5 This is a schematic block diagram of the device control apparatus provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of an embodiment of the terminal device provided in this invention. Detailed Implementation

[0017] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0018] In the description of this application, the terms "first," "second," "third," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first," "second," "third," etc., may explicitly or implicitly include one or more of the stated features.

[0019] In this application, the term "exemplary" is used to mean "used as an example, illustration, or description." Any embodiment described as "exemplary" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use this application. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that this application can be made without using these specific details. In other instances, well-known structures and processes are not described in detail to avoid obscuring the description of this application with unnecessary detail. Therefore, this application is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.

[0020] It should be noted that since the method in this application embodiment is executed in a terminal device, the processing objects of each terminal device exist in the form of data or information, such as time, which is essentially time information. It can be understood that if size, quantity, position, etc. are mentioned in subsequent embodiments, they are all corresponding data that exist so that the terminal device can process them. Specific details will not be elaborated here.

[0021] This application provides a device control method, apparatus, terminal device, and computer-readable storage medium, which will be described in detail below.

[0022] Please see Figure 1 , Figure 1 This is a schematic diagram of a device control system provided in an embodiment of the present invention. The device control system may include a terminal device 100, which integrates a device control unit, such as... Figure 1 Terminal devices in the process.

[0023] In this embodiment, the terminal device 100 is mainly used to disconnect the main system from the power supply when it is determined that the main system is in a power-off state; after receiving the power-on signal, it controls the main system to connect to the power supply. The method of this application can disconnect the main system from the power supply after the main system is powered off, thereby reducing the energy consumption of the terminal device during the power-off period. It can also supply power to the main system after receiving the power-on signal, ensuring that the terminal device can be powered on normally.

[0024] In this embodiment, the terminal device 100 can be an independent server, a server network, or a server cluster. For example, the terminal device 100 described in this embodiment includes, but is not limited to, a computer, a network host, a single network server, a set of multiple network servers, or a cloud server composed of multiple servers. The cloud server is composed of a large number of computers or network servers based on cloud computing.

[0025] It is understood that the terminal device 100 used in the embodiments of this application can be a device that includes both receiving and transmitting hardware, that is, a device having receiving and transmitting hardware capable of performing bidirectional communication on a bidirectional communication link. Such a device may include: cellular or other communication devices having a single-line display, a multi-line display, or a cellular or other communication device without a multi-line display. Specifically, the terminal device 100 may be a desktop terminal or a mobile terminal, and the terminal device 100 may also be one of a mobile phone, tablet computer, laptop computer, etc.

[0026] Those skilled in the art will understand that Figure 1 The application environment shown is merely one application scenario of the solution in this application and does not constitute a limitation on the application scenario of the solution in this application. Other application environments may include those that are more specific to this application. Figure 1 The number of more or fewer terminal devices shown, for example Figure 1 Only one terminal device is shown in the diagram. It is understood that the control system of this device may also include one or more other services, which are not specified here.

[0027] In addition, such as Figure 1 As shown, the device control system may also include a memory 200 for storing data.

[0028] It should be noted that, Figure 1 The schematic diagram of the equipment control system shown is merely an example. The equipment control system and scenario described in the embodiments of this application are intended to more clearly illustrate the technical solutions of the embodiments of this application and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of equipment control systems and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0029] First, this application provides a device control method. The execution subject of the device control method is a device control device, which is located in a microcontroller unit (MCU) in a terminal device. The device control method includes: disconnecting the main system from the power supply when it is determined that the main system is in a power-off state; and controlling the main system to connect to the power supply after receiving a power-on signal.

[0030] Figure 2 This is a flowchart illustrating one embodiment of the device control method provided in this invention, as shown below. Figure 2 The diagram shown is a flowchart of an embodiment of the device control method in this application. This device control method is applied to the microcontroller of a terminal device. The terminal device also includes a power supply and a main system. The power supply provides power to the microcontroller and the main system. The device control method may include the following steps S201 to S202, as detailed below: Step S201: When it is determined that the main system is in a power-off state, disconnect the main system from the power supply.

[0031] In one specific embodiment, the terminal device can be a device with a built-in battery as its power source, capable of operating without being connected to an external power source. Examples include smartphones, tablets, smartwatches or bracelets, smart speakers, smart cameras, smart projectors, and smart door locks. This embodiment does not impose specific limitations. The main system can be the core operating system or control center in the smart terminal device, used to manage hardware resources, run applications, coordinate device functions, and interact with the user. The hardware device upon which the main system relies can be a set of integrated circuits integrating one or more processors and one or more memories.

[0032] In this invention, the microcontroller, the execution subject, is set up independently of the integrated circuit on which the main system relies. That is to say, when the main system is powered off, the microcontroller can receive power and can execute the device control method in this application independently of the main system. Whether the main system is powered off or not does not affect whether the microcontroller is powered off.

[0033] Furthermore, the microcontroller can control whether the power supply within the terminal device supplies power to the main system. When the microcontroller determines that the main system has been shut down, in order to prevent the backup modules in the main system from still consuming power, it can directly disconnect the main system from the power supply, which can effectively reduce power consumption and thus reduce the overall energy consumption of the terminal device.

[0034] Step S202: After receiving the power-on signal, control the main system to connect to the power supply.

[0035] In one specific embodiment, since the main system cannot connect to the power supply and start automatically when the power is off, the microcontroller needs to control the main system to connect to the power supply after receiving the power-on signal so that the power supply can supply power to the main system and enable the terminal device to work normally.

[0036] In one specific embodiment, the power-on signal is an instruction or electrical signal that triggers the terminal device to switch from a power-off state to a running state. It can be triggered in various ways. For example, it can be triggered by the user, such as when the user presses the power button, which triggers an electrical signal as a switch signal; or when the user presses the remote control, which emits an infrared signal, and the infrared receiver in the terminal device receives the infrared signal and generates an electrical signal as a switch signal; or it can be triggered automatically by the device, such as when the user sets a timed power-on, and the device automatically triggers an electrical signal as a switch signal at the predetermined time; or the device can automatically trigger an electrical signal as a switch signal when it detects that a charger is connected; or other devices can send a specific data packet to the terminal device via a wireless connection, and the terminal device automatically triggers an electrical signal as a switch signal when it parses the data packet as a power-on instruction. This embodiment does not impose any specific limitations.

[0037] In one specific implementation, the terminal device further includes a power conversion device, through which the power supply is connected to the main system. The microcontroller includes a first pin, which is connected to the enable pin of the power conversion device. Step S201 disconnects the main system from the power supply, specifically including: controlling the first pin to output a first level signal so that the power conversion device is in a turned-off state; Step S202 connects the main system to the power supply, specifically including: controlling the first pin to output a second level signal so that the power conversion device is in a working state.

[0038] In one specific embodiment, a power conversion device is a device used to adjust the form of power, current, or electrical energy. It can convert one type of power supply (such as high voltage) to another type (such as low voltage) to ensure that electronic components with different requirements within the terminal device can be powered by a power supply that meets their needs. The power conversion device has an enable pin, which is used to control the operating state of the power conversion device, including an operating state and a shutdown state.

[0039] Therefore, a power converter can be used as an intermediate component connecting the power supply and the main system. The power converter converts the fixed voltage and current supplied by the power supply to the specifications required by the main system. In this case, the microcontroller can control the on / off state of the circuit between the power supply and the main system by controlling the switching of the power converter. Specifically, the first pin of the microcontroller can be connected to the enable pin of the power converter. The first pin outputs a first-level signal to turn off the power converter, and a second-level signal to turn it on. The first-level signal can be low, and the second-level signal can be high; that is, the power converter is off when the enable pin is low, and on when the enable pin is high. The first and second level signals can be flexibly set, and this embodiment does not impose specific limitations.

[0040] In one specific implementation, the terminal device further includes an infrared receiver and a power button, and the microcontroller further includes a second pin and a third pin, with the second pin connected to the infrared receiver and the third pin connected to the power button. After receiving the power-on signal, before the control system connects to the power supply, the following steps are also included: acquiring the level signal of the second pin and the level signal of the third pin; and determining whether the power-on signal has been received based on the level signal of the second pin and the level signal of the third pin.

[0041] In one specific embodiment, the terminal device can interact with the user based on an infrared receiver and a power button. The microcontroller can be connected to the infrared receiver via a second pin and to the power button via a third pin. When a user interacts with the terminal device using a remote control capable of generating infrared signals, the remote control generates an infrared signal corresponding to the operation and sends it to the terminal device. The infrared receiver in the terminal device receives this infrared signal and converts it into an electrical signal, which is then input to the microcontroller via the second pin. When the user interacts with the terminal device using the power button, pressing the power button generates a voltage level signal, which is input to the microcontroller via the third pin. Therefore, the microcontroller can determine whether a power-on signal has been received by acquiring the voltage levels of the second and third pins.

[0042] In one specific implementation, determining whether a power-on signal has been received based on the level signals of the second pin and the third pin includes: determining that a power-on signal has been received when the level signal of the second pin is the third level signal, or when the level signal of the third pin is the fourth level signal; and determining that a power-on signal has not been received when the level signal of the second pin is neither the third level signal nor the fourth level signal.

[0043] In one specific embodiment, the electrical signal generated when a button is pressed can be configured to be different from the electrical signal in the circuit when the button is idle, and the electrical signal obtained by the infrared receiver from the infrared signal can be configured to be different from the electrical signal in the circuit when no infrared signal is received. For example, the electrical signal obtained by the infrared receiver from the infrared signal can be configured to be a third level signal, and the electrical signal in the circuit when no infrared signal is received can be a different level signal than the third level signal; a fourth level signal can be configured to be generated when a button is pressed, and the electrical signal in the circuit when the button is idle can be a different level signal than the fourth level signal. Specifically, the third level signal can be configured to be a high level signal and the fourth level signal can also be configured to be a low level signal and the fourth level signal can also be configured to be a low level signal, or the third level signal can be configured to be a high level signal and the fourth level signal can be a low level signal. This embodiment does not impose specific limitations.

[0044] Therefore, when the microcontroller determines that the level signal in the second pin is a third level signal, or the level signal in the third pin is a fourth level signal, it can be assumed that the user has pressed a button or operated the remote control, and a power-on signal can be confirmed. However, if the microcontroller determines that the level signal in the second pin is not a third level signal, but some other level signal different from the third level signal, and the level signal in the third pin is not a fourth level signal, but some other level signal different from the fourth level signal, it can be assumed that the user has neither pressed a button nor operated the remote control, and a power-on signal can be confirmed.

[0045] It's important to note that the third and fourth level signals on the second pin indicate that the user has pressed a button or operated the remote control. However, typically, the same button represents both power on and power off. Powering on via remote control also involves pressing the same button on the remote. In other words, the user's action to power on and power off is identical, resulting in the same signal: either a third or fourth level signal. Therefore, the microcontroller cannot directly determine if the user intends to power on based solely on the received third or fourth level signal. Instead, it must have previously determined that the main system was powered off, thus indicating a power-on intention. Conversely, if the main system was previously connected to the power supply, it indicates a power-off intention. In summary, after receiving a third or fourth level signal, the microcontroller can also check the most recent connection operation between the main system and the power supply to determine whether the connection was established or terminated, thus determining whether the received signal is a power-on or power-off signal. Of course, if other circuits are set at the infrared receiver and the button so that the third and fourth level signals can only represent the user's intention to turn on the device, and other level signals can represent the user's intention to turn off the device, then the microcontroller can directly determine that it has received the power-on signal.

[0046] In one specific implementation, the microcontroller further includes a fourth pin, which is connected to the main system; before disconnecting the main system from the power supply when it is determined that the main system is in a power-off state, the microcontroller further includes: acquiring the level signal of the fourth pin; and determining whether the main system is in a power-off state based on the level signal of the fourth pin.

[0047] In one specific embodiment, the microcontroller can determine whether the main system is powered off by the level signal on the fourth pin connected to the main system. After confirming that the main system is powered off, it disconnects the main system from the power supply. The main system can automatically shut down based on the user's shutdown operation, ensuring that all tasks terminate in an orderly manner, the hardware is stable, and the data is intact. The microcontroller then disconnects the main system from the power supply after confirming that the main system has automatically shut down. If the microcontroller directly cuts off the power to the main system based on the user's shutdown operation, data corruption, loss of unsaved files, missing system files, configuration errors, and even disk hardware damage may occur in the main system.

[0048] It should be noted that the main system can receive signals indicating the user's intention to shut down in several ways. For example, the main system can be connected to the power button to receive the electrical signal triggered by the user pressing the power button; it can also be connected to an infrared receiver to receive the electrical signal generated by the infrared receiver in response to the user's operation of the remote control to shut down; it can also be connected to a timer to receive the electrical signal triggered by the user setting a timer to shut down; and it can also be connected to a wireless receiver to receive the electrical signal generated by the wireless receiver in response to the user sending a specific data packet indicating shutdown to the terminal device via other wireless devices. Of course, if the infrared receiver and the power button are already connected to the microcontroller, and the microcontroller is in turn connected to the main system, the microcontroller can transmit the level signals generated by the infrared receiver and the power button to the main system, causing the main system to automatically power on or off.

[0049] In one specific implementation, the system determines whether it is in a power-off state based on the level signal of the fourth pin. Specifically, this includes: determining that the main system is in a power-off state when the level signal of the fourth pin is the fifth level signal; and determining that the main system is not in a power-off state when the level signal of the fourth pin is the sixth level signal.

[0050] In one specific embodiment, when the main system is operating normally, the key pins connected to the fourth pin in the main system will maintain a specific voltage level (such as high or low level). These states are directly controlled by the main system power management circuit or the main control chip. When the main system enters the shutdown process, the power management module will gradually cut off the internal power supply of the main system or adjust the pin output, causing a significant change in the voltage level of the key pins. For example, when the main system is powered on, it may output a continuous high-level signal through the key pin to drive an indicator light or activate an external device, while the key pin will become low when powered off. Alternatively, the main system may output a specific voltage through a dedicated power status pin, which is high when powered on and low when powered off. The external circuit only needs to detect the voltage level of this pin to know the system status.

[0051] The microcontroller can connect to a critical pin or power status pin of the main system via its fourth pin to determine whether the main system is powered off by judging the level signal on the fourth pin. When the level signal on the fourth pin is the fifth level signal, it is determined that the main system is powered off; when the level signal on the fourth pin is the sixth level signal, it is determined that the main system is not powered off. The fifth level signal can be low, and the sixth level signal can be high; this embodiment does not impose any limitations.

[0052] In practice, considering signal delay and noise interference, the pin level may not change immediately after the main system is powered off. You can wait for a period of time (such as several hundred milliseconds) before testing, or confirm that the level is stable by sampling multiple times.

[0053] In one specific implementation, after disconnecting the main system from the power supply, the following steps are also included: entering a sleep mode to reduce power consumption, wherein in the sleep mode, only a preset signal is responded to, and the preset signal includes the third level signal of the second pin and the fourth level signal of the third pin.

[0054] In one specific embodiment, to further reduce power consumption, after disconnecting the main system from the power supply, the microcontroller can also enter a low-power sleep mode, responding only to pre-set signals. For example, the microcontroller's main clock can be turned off, and it can only be woken up by externally input signals (such as third-level and fourth-level signals) or signals generated by timers. Such a deep sleep mode consumes very little power, typically in the microamplitude range, which can greatly reduce power consumption in powered-off terminal devices while ensuring that powered-off terminal devices can be successfully woken up.

[0055] Figure 3 This is a schematic diagram of a specific embodiment of a circuit for controlling a device provided in this invention. The circuit is located in a terminal device and includes a microcontroller 301, a main system 302, a power supply 303, a low-dropout linear regulator 304, a power conversion device 305, an infrared receiver 306, and a power on / off button 307. Figure 3 As shown, the power supply powers the microcontroller and infrared receiver through a low-dropout regulator (LDO), which provides a stable and low-noise DC voltage for the microcontroller and infrared receiver. The power supply also powers the main system through a power converter. Meanwhile, the microcontroller is communicatively connected to the infrared receiver, the power button, the power converter, and the main system, meaning that the microcontroller can receive level signals sent by the infrared receiver, the power button, the power converter, and the main system.

[0056] The microcontroller is connected to the infrared receiver via IO1 to receive level signals (pin 2 mentioned earlier); it is also connected to the power button via IO2 to receive level signals (pin 3 mentioned earlier); it is connected to the power converter via IO3 to output level signals (pin 1 mentioned earlier); and it is connected to the main system via IO4 to receive level signals (pin 4 mentioned earlier).

[0057] Furthermore, based on Figure 3 One circuit connection method is provided. Figure 4 This is a flowchart illustrating a specific embodiment of the device control method provided in this invention, as shown below. Figure 4As shown, when the terminal device is powered off, the microcontroller detects that IO4 is pulled low by the main system (i.e., receives a low-level signal through IO4). After a 500-millisecond delay, after confirming that the main system has completely completed the power-down process, it controls IO3 to pull the enable pin of the power conversion device low (i.e., outputs a low-level signal to the enable pin through IO3), thus shutting down the main system power. After shutting down the main system power, the microcontroller enters sleep mode. In this mode, the power consumption of the microcontroller is further reduced. At the same time, the microcontroller cannot perform complex responses and can only respond to the level signals emitted by the infrared receiver and the power button. During this stage, the power supply only supplies power to the low-power microcontroller and infrared receiver through a low-dropout linear regulator, and the power supply enters low-power mode. After entering low-power mode, the microcontroller continuously responds to the level signals emitted by the infrared receiver and the power button. When it captures the level signal indicating power-on, it pulls IO3 high to turn on the main system power supply, and the entire device powers on.

[0058] To better implement the device control method in the embodiments of this application, based on the device control method, this application also provides a device control apparatus, applied to a microcontroller of a terminal device. The terminal device further includes a power supply and a main system, the power supply being used to power the microcontroller and the main system, such as... Figure 5 As shown, the equipment control device 500 includes: The power shutdown module 510 is used to disconnect the main system from the power supply when it is determined that the main system is in a power-off state; The power connection module 520 is used to control the connection between the main system and the power supply after receiving a power-on signal.

[0059] In this embodiment, by setting a device control unit within the terminal device, the device control unit disconnects the main system from the power supply when it determines that the main system is in a powered-off state; upon receiving a power-on signal, it controls the main system to reconnect to the power supply. This allows the main system to be disconnected from the power supply after it is powered off, reducing energy consumption during the terminal device's power-off period. It also ensures that the main system is powered on upon receiving a power-on signal, guaranteeing the normal power-on of the terminal device. The device control unit can be housed within the microcontroller mentioned earlier.

[0060] In some embodiments of this application, the terminal device further includes a power conversion device, through which the power supply is connected to the main system. The device control device includes a first pin, which is connected to the enable pin of the power conversion device. The power shutdown module 510 disconnects the main system from the power supply, including: The first control pin outputs a first level signal to keep the power conversion device in the off state; The power connection module 520 controls the connection between the main system and the power supply, including: The first control pin outputs a second-level signal to enable the power conversion device to operate.

[0061] In some embodiments of this application, the terminal device further includes an infrared receiver and a power button, and the device control device further includes a second pin and a third pin, wherein the second pin is connected to the infrared receiver and the third pin is connected to the power button; after receiving the power-on signal and before controlling the main system to connect to the power supply, the power connection module 520 is further used for: Obtain the level signal of the second pin and the level signal of the third pin; Based on the level signals of the second and third pins, determine whether a power-on signal has been received.

[0062] In some embodiments of this application, the power connection module 520 determines whether a power-on signal has been received based on the level signals of the second pin and the third pin, including: When the level signal of the second pin is the third level signal, or the level signal of the third pin is the fourth level signal, it is determined that a power-on signal has been received; If the level signal of the second pin is not the third level signal and the level signal of the third pin is not the fourth level signal, it is determined that no power-on signal has been received.

[0063] In some embodiments of this application, the device control device further includes a fourth pin, which is connected to the main system; before disconnecting the main system from the power supply when it is determined that the main system is in a power-off state, the power-off module 510 is further configured to: Obtain the level signal of the fourth pin; The system determines whether it is powered off based on the level signal of the fourth pin.

[0064] In some embodiments of this application, the power-off module 510 determines whether the main system is in a power-off state based on the level signal of the fourth pin, including: When the level signal on the fourth pin is the fifth level signal, it is determined that the main system is in a power-off state; When the level signal on the fourth pin is the sixth level signal, it is determined that the main system is not in a power-off state.

[0065] This application embodiment also provides a terminal device, the terminal device including: The system includes a microcontroller, a power supply, and a main system. The power supply provides power to the microcontroller and the main system. The microcontroller is configured to perform the steps of the device control method in any of the embodiments described above. Figure 6 As shown, it illustrates a structural schematic diagram of the terminal device involved in the embodiments of this application. Specifically: The terminal device may include components such as a microcontroller 601, a main system 602, and a power supply 603. Those skilled in the art will understand that... Figure 6 The terminal device structure shown does not constitute a limitation on the terminal device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0066] Specifically, in this embodiment, the microcontroller 601 in the terminal device runs the application program stored in the memory to achieve various functions, as follows: When the main system is confirmed to be powered off, disconnect the main system from the power supply. Upon receiving the power-on signal, the main control system connects to the power supply.

[0067] In one specific embodiment, the terminal device further includes a power conversion device, through which the power supply is connected to the main system. A first pin of the microcontroller is connected to the enable pin of the power conversion device, and the microcontroller controls the switching on and off of the power conversion device based on the level signal output by the first pin.

[0068] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0069] Therefore, embodiments of this application provide a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), a magnetic disk, or an optical disk, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any of the device control methods provided in embodiments of this application. For example, the computer program loaded by the processor can execute the following steps: When the main system is confirmed to be powered off, disconnect the main system from the power supply. Upon receiving the power-on signal, the main control system connects to the power supply.

[0070] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the detailed descriptions of other embodiments above, which will not be repeated here.

[0071] In practice, each of the above units or structures can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units or structures, please refer to the previous method embodiments, which will not be repeated here.

[0072] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0073] The above provides a detailed description of a device control method, apparatus, terminal device, and computer-readable storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A device control method, characterized in that, A microcontroller applied to a terminal device, the terminal device further comprising a power supply and a main system, the power supply being used to supply power to the microcontroller and the main system, the device control method comprising: When it is determined that the main system is in a powered-off state, disconnect the main system from the power supply; Upon receiving the power-on signal, the system controls the connection between the main system and the power supply.

2. The equipment control method according to claim 1, characterized in that, The terminal device further includes a power conversion device, through which the power supply is connected to the main system, and the microcontroller includes a first pin, which is connected to the enable pin of the power conversion device. Disconnecting the main system from the power supply includes: The first pin is controlled to output a first level signal so that the power conversion device is in the off state; The control of the main system and the power supply connection includes: The first pin is controlled to output a second level signal so that the power conversion device is in working state.

3. The equipment control method according to claim 1, characterized in that, The terminal device further includes an infrared receiver and a power button. The microcontroller further includes a second pin and a third pin, wherein the second pin is connected to the infrared receiver and the third pin is connected to the power button. The step of controlling the main system to connect to the power supply after receiving the power-on signal includes: Obtain the level signal of the second pin and the level signal of the third pin; Based on the level signals of the second pin and the third pin, it is determined whether a power-on signal has been received.

4. The equipment control method according to claim 3, characterized in that, The determination of whether a power-on signal has been received based on the level signal of the second pin and the level signal of the third pin includes: When the level signal of the second pin is the third level signal, or when the level signal of the third pin is the fourth level signal, it is determined that a power-on signal has been received; If the level signal of the second pin is not the third level signal and the level signal of the third pin is not the fourth level signal, it is determined that no power-on signal has been received.

5. The equipment control method according to claim 1, characterized in that, The microcontroller also includes a fourth pin, which is connected to the main system. Before disconnecting the main system from the power supply when it is determined that the main system is in a power-off state, the following steps are included: Obtain the level signal of the fourth pin; Based on the level signal of the fourth pin, it is determined whether the main system is in a power-off state.

6. The equipment control method according to claim 5, characterized in that, Determining whether the main system is in a power-off state based on the level signal of the fourth pin includes: When the level signal of the fourth pin is the fifth level signal, it is determined that the main system is in a power-off state; When the level signal of the fourth pin is the sixth level signal, it is determined that the main system is not in a power-off state.

7. A device control apparatus, characterized in that, A microcontroller for use in a terminal device, the terminal device further comprising a power supply and a main system, the power supply being used to power the microcontroller and the main system, the device control device comprising: A power-off module is used to disconnect the main system from the power supply when it is determined that the main system is in a power-off state; The power connection module is used to control the connection between the main system and the power supply after receiving a power-on signal.

8. A terminal device, characterized in that, The terminal device includes: a microcontroller, a power supply, and a main system, wherein the power supply is used to supply power to the microcontroller and the main system, and the microcontroller is configured to perform the device control method according to any one of claims 1 to 6.

9. The terminal device according to claim 8, characterized in that, It also includes a power conversion device, through which the power supply is connected to the main system. The first pin of the microcontroller is connected to the enable pin of the power conversion device, and the microcontroller controls the opening and closing of the power conversion device based on the level signal output by the first pin.

10. A computer-readable storage medium, characterized in that, It stores a computer program, which is loaded by a processor to execute the steps of the device control method according to any one of claims 1 to 6.