Device control method, electronic device, and computer-readable storage medium

By entering test mode when an electronic device is connected to a power supply, the output voltage value is monitored to identify the type of power supply, thus solving the problem of not being able to identify the type of power supply, improving the user experience and reducing hardware costs.

CN116500916BActive Publication Date: 2026-06-23ECOFLOW INC

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ECOFLOW INC
Filing Date
2023-03-30
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

In the prior art, when electronic devices are connected to a power connection cable that cannot transmit hardware identification signals, they cannot identify the type of power supply equipment, resulting in failure to start and operate, affecting user experience, and increasing the cost of hardware type identification.

Method used

When an electronic device is connected to a power supply, it enters a test mode, monitors the output voltage of the power supply, and identifies the device type according to preset conditions. If the device is a type that cannot provide stable power, it stops operating. The type of power supply is determined by monitoring the output voltage and the type identification conditions.

Benefits of technology

This technology enables electronic devices to start up and identify the type of power supply even when hardware identification signals cannot be received, avoiding frequent start-stop cycles, improving user experience, and reducing the cost of hardware type identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116500916B_ABST
    Figure CN116500916B_ABST
Patent Text Reader

Abstract

The application relates to the field of device control, and provides a device control method, an electronic device and a computer readable storage medium. The method is applied to an electronic device and comprises the following steps: when the electronic device is connected with a power supply device, entering a test mode, and controlling the electronic device to start running; monitoring an output voltage value of the power supply device, and identifying a device type of the power supply device according to the output voltage value and preset type identification conditions; if the device type of the power supply device is a preset type, controlling the electronic device to stop running; and the preset type is a power supply device type that cannot stably supply power. The above method can identify the type of the power supply device without increasing additional hardware cost, and the cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of equipment control, and more particularly to an equipment control method, electronic device, and computer-readable storage medium. Background Technology

[0002] To prevent electronic devices from malfunctioning when connected to an unstable power source, they typically determine the stability of the power supply based on hardware identification signals transmitted through the power cable before deciding whether to start. However, this control method places certain hardware requirements on the power cable. When a user connects an electronic device to the power supply using a cable that cannot transmit hardware identification signals, the device will not receive these signals and therefore cannot determine the stability of the power supply. Consequently, some electronic devices will not start, which undoubtedly affects the user experience. Summary of the Invention

[0003] This application provides a device control method, electronic device, and computer-readable storage medium, which aims to reduce the hardware cost of identifying the device type of a power supply device.

[0004] In a first aspect, this application provides a device control method applied to an electronic device, the method comprising:

[0005] When the electronic device is connected to the power supply, it enters test mode and controls the electronic device to start running.

[0006] Monitor the output voltage value of the power supply equipment, and identify the equipment type of the power supply equipment based on the output voltage value and preset type identification conditions;

[0007] If the power supply device is of a preset type, then the electronic device is controlled to stop operating; the preset type is a power supply device type that cannot provide stable power.

[0008] Secondly, this application also provides an electronic device, which includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, it implements the steps of any of the device control methods provided in the embodiments of this application.

[0009] Thirdly, this application also provides a computer-readable storage medium, characterized in that it stores computer-readable instructions thereon, which, when executed by the processor of an electronic device, cause the electronic device to perform any of the device control methods provided in the embodiments of this application.

[0010] This application provides a device control method, an electronic device, and a computer-readable storage medium. The method allows the electronic device to be started directly when connected to a power supply. The device type of the power supply is identified through the electronic device's test mode. If it is determined that the electronic device is connected to a power supply that cannot provide stable power, the electronic device is then stopped. This allows the electronic device to start and identify the type of power supply even without receiving a hardware identification signal from the power supply via the power connection cable. It also prevents frequent start-stops caused by unstable power supply, improving the user experience. Furthermore, this method allows users to connect the electronic device and the power supply using a power connection cable that cannot transmit hardware identification signals, reducing the hardware cost of identifying the hardware type. Attached Figure Description

[0011] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 A schematic flowchart illustrating a device control method according to an embodiment of this application;

[0013] Figure 2 This is a flowchart illustrating the sub-steps of a method for identifying the type of power supply equipment provided in an embodiment of this application;

[0014] Figure 3 This is a flowchart illustrating the sub-steps of a method for identifying the type of power supply equipment provided in an embodiment of this application;

[0015] Figure 4 This is a flowchart illustrating the sub-steps of a method for identifying the type of power supply equipment provided in an embodiment of this application;

[0016] Figure 5 This is a schematic block diagram of the structure of an electronic device according to an embodiment of this application. 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, 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] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.

[0019] For example, some high-power electronic devices are prone to power outages and shutdowns when connected to devices with unstable power supplies, such as connecting a refrigerator to a photovoltaic system. Therefore, to prevent frequent power on / off cycles caused by unstable power supply, it is usually necessary to control the electronic devices to first identify the type of power supply and only start the electronic devices after confirming that the power supply can provide a stable supply.

[0020] In related technologies, electronic devices can acquire hardware identification signals sent by power supply equipment and identify whether the connected power supply equipment is capable of providing stable power supply based on the hardware identification signals. For example, a terminal for transmitting hardware identification signals can be added to the commonly used XT60 interface; if the electronic device receives a hardware identification signal indicating that the power supply equipment can provide stable power supply through this terminal, such as receiving a hardware identification signal indicating that the connected power supply equipment is a constant voltage power supply, then the electronic device is controlled to start operation; if the electronic device does not receive a hardware identification signal indicating that the power supply equipment can provide stable power supply, such as receiving a hardware identification signal indicating that the connected power supply equipment is a photovoltaic device, or does not receive any hardware identification signal at all, then the electronic device is not controlled to start operation.

[0021] However, the above solution places certain hardware requirements on the power cable used to connect the electronic device and the power supply. If the power cable cannot transmit hardware identification signals—for example, if the power cable interface does not have a terminal for transmitting hardware identification signals—the electronic device cannot identify the type of the power supply based on the hardware identification signal when connected. In this case, even if the power supply connected to the electronic device is a stable power supply type, the electronic device may fail to start and operate because it cannot identify the type of the power supply, affecting the user experience when using the electronic device.

[0022] To solve the above problem, please refer to Figure 1 , Figure 1 This is a flowchart illustrating a device control method provided in an embodiment of this application. The device control method provided in this application can be applied to electronic devices, such as refrigerators, air conditioners, induction cookers, electric baking pans, energy storage devices, etc. This application does not limit the specific type of electronic device.

[0023] The device control method provided in this application embodiment can be stored in the memory of an electronic device in the form of a computer program and executed by the processor of the electronic device.

[0024] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0025] like Figure 1 As shown, the device control method includes steps S110 to S130.

[0026] Step S110: When the electronic device is connected to the power supply, enter the test mode and control the electronic device to start running.

[0027] In related technologies, some electronic devices, before determining that the connected power supply device is a stable power supply device based on the received hardware identification signal, will not control the electronic device to start and run in order to prevent the electronic device from frequently turning on and off due to the unstable power supply device.

[0028] In embodiments of this application, electronic devices can identify the type of power supply device even when they cannot receive a hardware identification signal.

[0029] When the electronic device is connected to the power supply, it can be controlled to start up and enter the test mode.

[0030] Step S120: Monitor the output voltage value of the power supply equipment, and identify the equipment type of the power supply equipment based on the output voltage value and preset type identification conditions.

[0031] In test mode, the electronic device can monitor the output voltage of the power supply device. When the power supply device is unstable, its output voltage may fluctuate. Therefore, in this embodiment, the output voltage of the power supply device can be monitored, and the device type of the power supply device can be identified according to preset type identification conditions.

[0032] The above-mentioned equipment types can include equipment types that cannot be stably powered and equipment types that can be stably powered.

[0033] The above-mentioned type identification conditions can be set according to actual conditions. For example, the above-mentioned type identification conditions can be related to one or more of the following indicators: maximum value, minimum value, variance, etc. of the output voltage. The embodiments of this application do not limit the specific content of the type identification conditions.

[0034] For example, after an electronic device is started, it can determine whether the power supply device can provide stable power based on the output voltage value of the power supply device and preset type identification conditions. In order to determine the device type of the power supply device connected to the electronic device when the electronic device cannot receive the hardware identification signal, the electronic device can be controlled to stop or continue to operate according to the device type, so as to avoid the electronic device from frequently turning on and off when connected to a power supply device that cannot provide stable power, thereby improving the user experience.

[0035] Step S130: If the power supply equipment type is a preset type, then control the electronic equipment to stop operating; the preset type is a power supply equipment type that cannot provide stable power.

[0036] For example, when it is determined that the power supply equipment cannot provide a stable power supply, the electronic device can be controlled to stop operating, thereby avoiding frequent power on and off of the electronic device when connected to a power supply equipment that cannot provide a stable power supply, and improving the user experience.

[0037] For example, the preset type is the type of power supply equipment that cannot provide stable power to electronic devices, such as photovoltaic power generation equipment, wind power generation equipment, etc. Of course, it is not limited to this, and the preset type is not limited here.

[0038] The method provided in this application allows electronic devices to start operating and identify the type of power supply even without receiving a hardware identification signal from the power supply device via a power connection cable. Furthermore, it promptly stops operation when the power supply device is determined to be unstable, preventing frequent start-stop cycles due to power supply instability and improving the user experience. Moreover, this method allows users to connect electronic devices and power supply devices using power connection cables that cannot transmit hardware identification signals, reducing the hardware cost of identifying hardware types.

[0039] Please see Figure 2 , Figure 2 This is a flowchart illustrating the sub-steps of a method for identifying the type of power supply equipment provided in an embodiment of this application.

[0040] like Figure 2 As shown, in some embodiments, step S120 monitors the output voltage value of the power supply equipment and identifies the equipment type of the power supply equipment based on the output voltage value and preset type identification conditions, including:

[0041] Step S121a: Send different target current requests to the power supply equipment. Different target current requests are used to request the power supply equipment to output electrical signals with different target current values.

[0042] To determine the type of power supply equipment, electronic devices can be controlled to actively apply disturbances to the power supply equipment, and the output voltage value of the power supply equipment under different operating conditions can be tested.

[0043] For example, electronic devices can be controlled to send multiple different target current requests to power supply devices, enabling electronic devices to request electrical signals with different target current values ​​from connected power supply devices.

[0044] The number of target current requests and the corresponding target current values ​​can be set according to the actual situation.

[0045] Step S121b: Monitor the output voltage value corresponding to different target current requests;

[0046] When the power supply equipment requests to output electrical signals based on different target currents, the electronic equipment monitors the output voltage value corresponding to the different target current requests. In order to determine whether the power supply equipment can provide stable power supply, the electronic equipment monitors the output voltage corresponding to the power supply equipment outputting electrical signals with different target current values.

[0047] The output voltage value corresponding to the target current request can be the output voltage value obtained by directly sampling the voltage after the electronic device sends the target current request to the power supply device; alternatively, the output voltage value corresponding to the target current request can be the output voltage value obtained by sampling the voltage after the electronic device sends the target current request and waits for a certain period of time; or, the output voltage value corresponding to the target current request can be multiple output voltage values ​​sampled by the electronic device within a certain period of time after sending the target current request. This application does not limit the method of obtaining the output voltage value corresponding to the target current request.

[0048] Step S121c: Determine the equipment type of the power supply equipment based on multiple output voltage values ​​and type identification conditions.

[0049] After obtaining multiple output voltage values ​​corresponding to different target current requests, the equipment type of the power supply equipment can be determined based on the type identification conditions.

[0050] In this embodiment, the electronic device requests electrical signals with different target current values ​​so that it can determine whether the power supply device belongs to a preset type based on the output voltage value when the power supply device outputs electrical signals with different current values. This allows the electronic device to determine the type of the power supply device even when it cannot receive hardware identification signals, thus improving the user experience.

[0051] In some implementations, step S121c determines the device type of the power supply device based on multiple output voltage values ​​and type identification conditions, including: if the variance between multiple output voltage values ​​is greater than or equal to a first preset threshold, then the device type is determined to be a preset type.

[0052] For example, the type identification condition could be that the variance among multiple output voltage values ​​is greater than or equal to a first preset threshold.

[0053] By analyzing the variance of multiple output voltage values, it is possible to determine whether the output voltage value corresponding to an electrical signal with different target current values ​​is stable.

[0054] After obtaining multiple output voltage values, the variance of the multiple output voltage values ​​can be calculated.

[0055] If the variance of multiple output voltage values ​​is less than or equal to the first preset threshold, it indicates that the electrical signal output by the power supply equipment is relatively stable and the output voltage fluctuation is small, thus confirming that the power supply equipment is a stable power supply equipment.

[0056] If the variance of multiple output voltage values ​​is greater than the first preset threshold, it indicates that the electrical signal output by the power supply equipment is unstable and the output voltage fluctuates greatly. It can be determined that the equipment type of the power supply equipment is the preset type, that is, the power supply equipment is a power supply equipment that cannot provide stable power supply.

[0057] The aforementioned first preset threshold can be determined according to actual needs.

[0058] In other embodiments, the stability of multiple output voltage values ​​can also be determined by other indicators, such as comparing the standard deviation between multiple output voltage values ​​with a preset standard deviation threshold, which is not limited here.

[0059] Please see Figure 3 , Figure 3 This is a flowchart illustrating the sub-steps of a method for identifying the type of power supply equipment provided in an embodiment of this application.

[0060] like Figure 3 As shown, in some embodiments, step S120 monitors the output voltage value of the power supply equipment and identifies the equipment type of the power supply equipment based on the output voltage value and preset type identification conditions, including:

[0061] Step S122a: Send a target power request to the power supply equipment. The target power request is used to request the power supply equipment to output an electrical signal with a target power value, which is greater than a preset power value.

[0062] In order to determine the type of power supply equipment, the electronic control device sends a target power request to the power supply equipment, so that the electronic control device requests the electrical signal corresponding to the target power value from the connected power supply equipment.

[0063] The target power value corresponding to the target power request can be set according to the actual situation. Within the allowable range of the electronic equipment, the target power value is usually set to a larger value in order to test whether the power supply equipment can output a larger power signal normally and to determine whether the power supply equipment can supply power stably.

[0064] Therefore, in some embodiments, the target power value may be limited to be greater than a preset power value. The preset power value may be the rated operating power of the electronic device, or it may be other values, which are not limited in this application embodiment.

[0065] Step S122b: Monitor the output voltage and output current values ​​corresponding to the target power request;

[0066] When the power supply equipment outputs an electrical signal based on the target power request, the output voltage and output current values ​​corresponding to the electrical signal are monitored. Based on the output voltage and output current values, it is determined whether the power supply equipment can output the electrical signal corresponding to the target power request, thereby determining whether the power supply equipment can provide stable power supply.

[0067] Step S122c: Determine the equipment type of the power supply equipment based on the output voltage value, output current value, and type identification conditions.

[0068] After obtaining the output voltage and output current values, the output power of the power supply equipment can be determined. Then, based on the output power of the power supply equipment and the aforementioned type identification conditions, the equipment type of the power supply equipment is determined.

[0069] In this embodiment, an electronic device requests a target power value from a power supply device via an electrical signal. The electronic device then determines whether the power supply device belongs to a preset type based on the electrical signal corresponding to the target power request. This allows the electronic device to determine the type of power supply device even when it cannot receive a hardware identification signal, thus improving the user experience.

[0070] Please refer to Figure 4 , Figure 4 This is a flowchart illustrating the sub-steps of a method for identifying the type of power supply equipment provided in an embodiment of this application.

[0071] like Figure 4 As shown, in some embodiments, step S122c determines the device type of the power supply equipment based on the output voltage value, output current value, and type identification conditions, including:

[0072] Step S1221: Determine the output power value of the power supply equipment based on the output voltage and output current values;

[0073] In order to determine the type of power supply equipment based on the electrical signal output by the power supply equipment based on the target power request, the output voltage and output current values ​​of the electrical signal output based on the target power request are monitored so as to calculate the output power value of the power supply equipment based on the output voltage and output current values.

[0074] Step S1222: If the difference between the output power value and the target power value is greater than or equal to the second preset threshold, then the device type is determined to be the preset type.

[0075] In some embodiments, the above-mentioned type identification condition may be that the difference between the output power value and the target power value is greater than or equal to a second preset threshold.

[0076] Therefore, after determining the output power value of the power supply equipment, the above output power value can be compared with the above target power value.

[0077] If the difference between the output power value and the target power value is greater than or equal to the second preset threshold, it indicates that the power supply equipment cannot output an electrical signal with a higher power value requested by the electronic device. In this case, the power supply equipment type can be determined as a preset type that cannot provide stable power.

[0078] Conversely, if the difference between the output power value and the target power value of the power supply equipment is less than the second preset threshold, it indicates that the power supply equipment can normally output an electrical signal with a larger power value requested by the electronic device. In this case, it can be determined that the power supply equipment does not belong to the preset type that cannot provide stable power supply.

[0079] The second preset threshold value can be set according to actual needs.

[0080] In some implementations, step S110, when the electronic device is connected to the power supply device, enters a test mode and controls the electronic device to start running, including: after the electronic device is connected to the power supply device, if no hardware identification signal is received from the power supply device within a preset time, then the electronic device enters a test mode and controls the electronic device to start running.

[0081] If the power cable used by the user can transmit hardware identification signals, the electronic device can directly determine the type of power supply device being connected based on these signals. Therefore, after the electronic device is connected to the power supply device, a preset time can be waited to determine whether the electronic device can receive the hardware identification signal.

[0082] If the electronic device does not receive a hardware identification signal within the preset time, the electronic device can enter the test mode and execute the device control method of steps S110-S130.

[0083] In some embodiments, the above-mentioned device control method further includes: after the electronic device is connected to the power supply device, if a hardware identification signal sent by the power supply device is received within a preset time, the electronic device will not enter the test mode and will be controlled to start operation.

[0084] If the power cable used by the user can transmit hardware identification signals, the electronic device can receive the hardware identification signals sent by the power supply equipment through the power cable. In this case, the electronic device can directly identify the type of the power supply equipment based on the hardware identification signals, and control the electronic device to start or not start based on the equipment type determined by the hardware identification signals, without needing to enter a test mode, thus improving the efficiency of the electronic device in identifying the equipment type of the power supply equipment.

[0085] For example, if the type of the power supply device is determined to be a preset type based on the hardware identification signal, the electronic device is not controlled to start operation; if the type of the power supply device is determined to be a preset type based on the hardware identification signal, the electronic device is controlled to start operation.

[0086] In the above embodiments, after the electronic device is connected to the power supply device, it waits for a preset time and enters the test mode only if no hardware identification signal is received. Otherwise, the type of the power supply device is directly identified by the hardware identification signal, which improves the rationality and identification efficiency of the device type identification after the electronic device is connected to the power supply device.

[0087] In some embodiments, the device control method provided in this application further includes: when the electronic device is in test mode, if the electronic device loses power and stops operating, the electronic device is controlled not to start operating again until a new power supply is connected.

[0088] When an electronic device is in test mode, such as during the power supply device type identification method in steps S120-S130, the electronic device may experience an abnormal power outage and stop operating. This abnormal power outage could be caused by a sudden decrease in the electrical signal output by the power supply device, or it could be due to the electronic device's test mode. Regardless of the cause, it indicates that the power supply device's device type is a preset type that cannot stably supply power to the electronic device.

[0089] For example, if the target current value of the electrical signal requested in step S121a exceeds the current that the power supply device can provide, or if the target power value of the electrical signal requested in step S122a exceeds the power that the power supply device can provide, the output voltage of the power supply device may suddenly drop, thereby causing the electronic device to lose power and stop operating. This means that the power supply device belongs to the preset type that cannot provide stable power to the electronic device.

[0090] Therefore, if an electronic device stops operating due to power failure during the test mode, in order to prevent poor user experience caused by frequent power-on and power-off of the electronic device, the power supply device type identification method in steps S120-S130 will no longer be executed. Instead, the electronic device will be controlled to not start operating before a new power supply device is connected.

[0091] After an electronic device is connected to a new power supply, it can enter a test mode to identify the type of the newly connected power supply.

[0092] In some embodiments, connecting to a new power supply device can be understood as disconnecting the electronic device from the power supply device, and then connecting the same power supply device or another power supply device to the electronic device. That is to say, the new power supply device may be the same as the previous power supply device, or it may be a different power supply device. As long as the previous power supply device is disconnected first, and then the power supply device is reconnected, the reconnected power supply device can be considered a new power supply device.

[0093] In the device control method provided in this application embodiment, by entering a test mode when the electronic device is connected to another electronic device, the device type of the power supply device is identified according to the output voltage value of the power supply device. If it is determined that the power supply device belongs to a preset type that cannot provide stable power, the electronic device is controlled to stop running. This method can start the electronic device and identify the type of the power supply device when the electronic device cannot receive the hardware identification signal. Then, it determines whether to control the electronic device to stop working based on the identification result of the device type. This can avoid the electronic device not starting to work due to the inability to identify the device type, and also avoid the frequent start and stop of the electronic device due to unstable power supply, effectively improving the user experience.

[0094] Please see Figure 5 , Figure 5 This is a schematic block diagram of the structure of an electronic device according to an embodiment of this application.

[0095] An embodiment of this application also provides an electronic device, wherein the electronic device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, it implements the steps of the device control method as described in any of the embodiments of this application.

[0096] like Figure 5 As shown, the electronic device includes a processor and a memory connected via a system bus.

[0097] The processor provides computing and control capabilities, supporting the operation of the entire computer device.

[0098] The memory provides an environment for the execution of computer programs stored in the storage medium. When the computer program is executed by the processor, it enables the processor to perform any device control method.

[0099] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0100] It should be understood that the processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among these, a general-purpose processor can be a microprocessor or any conventional processor.

[0101] In one embodiment, the processor is configured to run a computer program stored in memory to perform the following steps:

[0102] When the electronic device is connected to the power supply, it enters the test mode and controls the electronic device to start running;

[0103] Monitor the output voltage value of the power supply equipment, and identify the equipment type of the power supply equipment based on the output voltage value and preset type identification conditions;

[0104] If the power supply equipment type is the preset type, then control the electronic equipment to stop operating; the preset type is the power supply equipment type that cannot provide stable power supply.

[0105] The embodiments of this application also provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, the computer program including program instructions, and a processor executes the program instructions to implement any of the device control methods provided in the embodiments of this application.

[0106] For example, when the program is loaded by the processor, it can perform the following steps: when the electronic device is connected to the power supply device, it enters the test mode and controls the electronic device to start running; it monitors the output voltage value of the power supply device and identifies the device type of the power supply device according to the output voltage value and the preset type identification conditions; if the device type of the power supply device is the preset type, it controls the electronic device to stop running; the preset type is the power supply device type that cannot provide stable power supply.

[0107] The computer-readable storage medium can be an internal storage unit of the electronic device described in the foregoing embodiments, such as a hard drive or memory of the electronic device. Alternatively, the computer-readable storage medium can be an external storage device of the electronic device, such as a plug-in hard drive, SmartMedia Card (SMC), Secure Digital Card (SD Card), or Flash Card.

[0108] Furthermore, a computer-readable storage medium may primarily include a stored program area and a stored data area, wherein the stored program area may store the operating system, an application program required for at least one function, etc.

[0109] This application provides a device control method, an electronic device, and a computer-readable storage medium. When the electronic device is connected to a power supply device, it enters a test mode and controls the electronic device to start running. It monitors the output voltage value of the power supply device and identifies the device type of the power supply device based on the output voltage value and preset type identification conditions. If the device type of the power supply device is a preset type, it controls the electronic device to stop running. The preset type is a power supply device type that cannot provide stable power. This improves the user experience when connecting the electronic device to the power supply device using a power connection cable that cannot transmit hardware identification signals, and reduces the hardware cost of hardware type identification.

[0110] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0111] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0112] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments. The above descriptions are merely specific implementations of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A device control method, characterized in that, Applied to electronic devices, the method includes: When the electronic device is connected to the power supply, it enters test mode and controls the electronic device to start running. Monitor the output voltage value of the power supply equipment, and identify the equipment type of the power supply equipment based on the output voltage value and preset type identification conditions; If the power supply device type is a preset type, then the electronic device is controlled to stop operating; the preset type is a power supply device type that cannot provide stable power; and, If the electronic device stops operating due to power failure while in test mode, the electronic device will not restart until a new power supply is connected.

2. The equipment control method according to claim 1, characterized in that, The monitoring of the output voltage value of the power supply equipment, and the identification of the equipment type of the power supply equipment based on the output voltage value and preset type identification conditions, includes: Send different target current requests to the power supply equipment, wherein the different target current requests are used to request the power supply equipment to output electrical signals with different target current values; Monitor the output voltage values ​​corresponding to different target current requests; The device type of the power supply equipment is determined based on the multiple output voltage values ​​and the type identification conditions.

3. The equipment control method according to claim 2, characterized in that, The step of determining the device type of the power supply equipment based on multiple output voltage values ​​and the type identification conditions includes: If the variance among the multiple output voltage values ​​is greater than or equal to a first preset threshold, then the device type is determined to be the preset type.

4. The equipment control method according to claim 1, characterized in that, The monitoring of the output voltage value of the power supply equipment, and the identification of the equipment type of the power supply equipment based on the output voltage value and preset type identification conditions, includes: Send a target power request to the power supply equipment, the target power request being used to request the power supply equipment to output an electrical signal with a target power value, the target power value being greater than a preset power value; Monitor the output voltage and output current values ​​corresponding to the target power request; The device type of the power supply equipment is determined based on the output voltage value, the output current value, and the type identification conditions.

5. The equipment control method according to claim 4, characterized in that, The step of determining the device type of the power supply equipment based on the output voltage value, the output current value, and the type identification conditions includes: The output power value of the power supply device is determined based on the output voltage value and the output current value. If the difference between the output power value and the target power value is greater than or equal to the second preset threshold, then the device type is determined to be the preset type.

6. The equipment control method according to any one of claims 1-5, characterized in that, When the electronic device is connected to the power supply, entering the test mode and controlling the electronic device to start operation includes: After the electronic device is connected to the power supply device, if no hardware identification signal is received from the power supply device within a preset time, the device enters the test mode and controls the electronic device to start running.

7. The equipment control method according to claim 6, characterized in that, The method further includes: After the electronic device is connected to the power supply device, if a hardware identification signal sent by the power supply device is received within a preset time, the test mode will not be entered, and the electronic device will be controlled to start running.

8. The equipment control method according to claim 1, characterized in that, The method further includes: After disconnecting the electronic device from the power supply device, the power supply device is then reconnected to the electronic device, indicating that the electronic device is connected to a new power supply device.

9. An electronic device, characterized in that, The electronic device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, it implements the steps of the device control method as described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, It stores computer-readable instructions that, when executed by the processor of the electronic device, cause the electronic device to perform the device control method according to any one of claims 1 to 8.