WO2022100245A1 - Charging method and apparatus, electronic device, and storage medium - Google Patents

Charging method and apparatus, electronic device, and storage medium Download PDF

Info

Publication number
WO2022100245A1
WO2022100245A1 PCT/CN2021/117204 CN2021117204W WO2022100245A1 WO 2022100245 A1 WO2022100245 A1 WO 2022100245A1 CN 2021117204 W CN2021117204 W CN 2021117204W WO 2022100245 A1 WO2022100245 A1 WO 2022100245A1
Authority
WO
WIPO (PCT)
Prior art keywords
charging
electronic device
duration
current
state
Prior art date
Application number
PCT/CN2021/117204
Other languages
French (fr)
Chinese (zh)
Inventor
常铭
Original Assignee
RealMe重庆移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by RealMe重庆移动通信有限公司 filed Critical RealMe重庆移动通信有限公司
Publication of WO2022100245A1 publication Critical patent/WO2022100245A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/007Regulation of charging or discharging current or voltage
    • H02J7/0071Regulation of charging or discharging current or voltage with a programmable schedule
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01MPROCESSES OR MEANS, e.g. BATTERIES, FOR THE DIRECT CONVERSION OF CHEMICAL ENERGY INTO ELECTRICAL ENERGY
    • H01M10/00Secondary cells; Manufacture thereof
    • H01M10/42Methods or arrangements for servicing or maintenance of secondary cells or secondary half-cells
    • H01M10/44Methods for charging or discharging
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/00032Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries characterised by data exchange
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/0047Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries with monitoring or indicating devices or circuits
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
    • Y02E60/10Energy storage using batteries

Definitions

  • the present application relates to the technical field of electronic devices, and more particularly, to a charging method, device, electronic device, and storage medium.
  • the present application proposes a charging method, an apparatus, an electronic device and a storage medium, which can improve the above problems.
  • an embodiment of the present application provides a charging method, the method includes: when an electronic device is in a charging state, determining a current charging scene; determining a charging limit duration corresponding to the current charging scene, wherein different charging The charging limitation durations corresponding to the scenarios are different; when the charging duration of the electronic device reaches the charging limitation duration, the charging of the electronic device is stopped.
  • an embodiment of the present application provides a charging device, the device includes: a scene determination module for determining a current charging scene when the electronic device is in a charging state; a duration determination module for determining the current The charging limit duration corresponding to the charging scenario, wherein the charging limit duration corresponding to different charging scenarios is different; the charging control module is configured to stop the charging of the electronic device when the charging duration of the electronic device reaches the charging limit duration .
  • embodiments of the present application provide an electronic device, comprising: one or more processors; a memory; and one or more application programs, wherein the one or more application programs are stored in the memory and Configured to be executed by the one or more processors, the one or more application programs are configured to execute the charging method provided by the first aspect.
  • an embodiment of the present application provides a computer-readable storage medium, where a program code is stored in the computer-readable storage medium, and the program code can be invoked by a processor to perform the charging provided in the first aspect above method.
  • FIG. 1 shows a flowchart of a charging method according to an embodiment of the present application.
  • FIG. 2 shows a flowchart of a charging method according to another embodiment of the present application.
  • FIG. 3 shows a flowchart of step S210 in the charging method according to another embodiment of the present application.
  • FIG. 4 shows a flowchart of step S212 in the charging method according to another embodiment of the present application.
  • FIG. 5 shows another flowchart of step S212 in the charging method according to another embodiment of the present application.
  • FIG. 6 shows a flowchart of a charging method according to yet another embodiment of the present application.
  • FIG. 7 shows a flowchart of step S310 in the charging method according to still another embodiment of the present application.
  • FIG. 8 shows a flowchart of step S312 in the charging method according to another embodiment of the present application.
  • FIG. 9 shows another flowchart of step S310 in the charging method according to still another embodiment of the present application.
  • FIG. 10 shows a schematic flowchart of a charging method according to an embodiment of the present application.
  • FIG. 11 shows a block diagram of a charging device according to an embodiment of the present application.
  • FIG. 12 is a block diagram of an electronic device for executing a charging method according to an embodiment of the present application according to an embodiment of the present application.
  • FIG. 13 is a storage unit for storing or carrying a program code for implementing the charging method according to the embodiment of the present application according to the embodiment of the present application.
  • the charging limit time of the electronic device is usually fixed.
  • the charging limit time of the electronic device is uniformly set to a fixed H hours.
  • the battery capacity of some electronic devices has increased to 5000mAh
  • the charging limit time is set to H hours, then in some scenarios with relatively small charging current (such as USB CDP mode), the large-capacity battery is The battery cannot be fully charged, and for some fast charging scenarios, it is uniformly set to H hours, which also poses a greater risk to the protection of the battery.
  • the inventor After long-term research, the inventor has discovered and proposed the charging method, device, electronic device, and storage medium provided by the embodiments of the present application, which can set different charging limit durations for different charging scenarios, so as to realize the charging limit for each charging scenario.
  • the differentiated control of the duration avoids a one-size-fits-all approach, thereby avoiding the situation that the battery cannot be fully charged in a scenario with a small current, and at the same time reducing the risk of battery damage in a scenario with a large charging current.
  • the specific charging method will be described in detail in the following embodiments.
  • FIG. 1 shows a schematic flowchart of a charging method provided by an embodiment of the present application.
  • the charging method can be applied to the charging apparatus 700 as shown in FIG. 11 and the electronic equipment ( FIG. 12 ) equipped with the charging apparatus 700 .
  • the process shown in FIG. 1 will be described in detail below, and the charging method shown may specifically include the following steps:
  • Step S110 When the electronic device is in the charging state, determine the current charging scene.
  • the electronic device may include a detection circuit for detecting whether the electronic device is in a charged state.
  • the detection circuit can identify the level value of the pin in the charging interface that is used to indicate the connection to the charging cable. When the level value is high, it can be considered that the current electronic device is connected to the charging device. At this time, it can be considered that the electronic device is detected to be in a charging state.
  • the detection circuit can also be used to detect whether the coil of the wireless charging unit generates alternating current of a certain frequency. When the coil generates alternating current, it can also be considered that the electronic device is connected to the charging device. An electronic device is detected to be charging.
  • whether the electronic device is in a charging state can also be determined through the BatteryManager of the power manager of the electronic device.
  • the BatteryManager broadcasts the charging details of the battery unit, the charging details may include whether the electronic device is in a charging state, and the charging information can be obtained through an Intent to determine whether the electronic device is in a charging state.
  • the detection of whether the electronic device is in a charging state can also be implemented through an API (application programming interface) provided by the electronic device.
  • an API application programming interface
  • the current charging scene when it is detected that the electronic device is in a charging state, the current charging scene can be determined.
  • the charging scene may be a charging environment with a certain charging speed, that is, different charging scenes have different charging speeds.
  • the charging scene may be determined according to the charging mode.
  • the charging method can be a wired charging method and a wireless charging method.
  • the wired charging method needs to plug the plug of the charging cable with the charging interface on the electronic device to be able to charge the electronic device; the wireless charging method needs to place the electronic device. On the wireless charging device, even close to the transmitter of the wireless charging device, the charging operation of the electronic device can be realized.
  • whether the electronic device adopts the wired charging mode can be determined by detecting the voltage change on the charging interface of the electronic device, and whether the electronic device adopts the wireless charging mode can also be determined by detecting whether the wireless communication module, such as the Bluetooth module, is turned on. charging method.
  • the electronic device adopts a wired charging method it can be determined that the current charging scene is a wired charging scene, and when the electronic device adopts a wireless charging method, it can be determined that the current charging scene is a wireless charging scene.
  • the charging scene may also be based on the charging device that charges the electronic device.
  • type is determined.
  • the type of the charging device may be an adapter charging type, a USB charging type, a type-c charging type, a wireless charger charging type, and the like.
  • the adapter can be understood as using the standard power adapter configured by the manufacturer.
  • the type of charging device may be a specific type of adapter, USB, type-c wireless charger, and other charging types. Therefore, it can be determined whether the current charging scene is an adapter charging scene, a USB charging scene, a type-c charging scene, or a wireless charger charging scene, etc. according to the type of the charging device charging the electronic device.
  • the charging speed of the electronic device may also be different. Therefore, in other embodiments, the charging scene may also be determined according to the device state of the electronic device.
  • the device state may include a standby state and a non-standby state. Therefore, according to the device state of the electronic device, it can be determined whether the current charging scene is a standby charging scene or a non-standby charging scene. Further, when in the non-standby state, the current charging scene may also be determined according to the type of the specific running application.
  • Step S120 Determine the charging limit duration corresponding to the current charging scenario, wherein the charging limit duration corresponding to different charging scenarios is different.
  • the charging time limit is set uniformly, the electronic device will be charged in some slow charging scenarios, and the large-capacity battery cannot fully charge the battery, and charging in some fast charging scenarios will increase the damage to the battery. risk. Therefore, in the embodiment of the present application, different charging limit durations may be set for different charging scenarios, so as to ensure that the battery is fully charged and at the same time reduce the risk of battery damage. Specifically, after the current charging scene is determined, the charging limit duration corresponding to the current charging scene may be determined, so as to control the charging process of the electronic device according to the charging limit duration.
  • the charging limit duration of each charging scenario may be set in advance, so that each time the electronic device is charged, an appropriate charging limit duration may be selected and controlled according to the current charging scenario.
  • the charging duration of each charging scene can be obtained through laboratory tests, and then the charging limit duration can be set according to the charging duration of each charging scene obtained by the test.
  • the charging limit duration may be greater than the charging duration obtained by testing.
  • the charging time limit can be 1.5 times the test charging time. It can also be equal to the charging time obtained by the test, which is not limited here.
  • Step S130 when the charging duration of the electronic device reaches the charging limit duration, stop charging the electronic device.
  • the electronic device may record the charging duration of the electronic device, so as to detect that the charging duration of the electronic device reaches the charging limit duration , you can stop charging the electronic device.
  • the charging duration of the electronic device may be obtained through the BatteryManager of the power manager of the electronic device, or the charging duration of the electronic device may be recorded through a timer, which is not limited herein. After the charging duration of the electronic device is acquired, it can be determined whether the charging duration is less than the charging limit duration determined above. When the charging duration is less than the above-determined charging limit duration, the charging state of the electronic device can be maintained, and when the charging duration is not less than the above-determined charging limit duration, charging the electronic device can be stopped.
  • reminder information may also be generated to remind the user to stop charging the electronic device.
  • the power can be automatically cut off or the charging can be stopped automatically.
  • the Bluetooth wireless communication module can be automatically controlled to turn off , which automatically stops charging the electronic device.
  • the present application when the electronic device is in the charging state, the current charging scene is determined to determine the charging limit duration corresponding to the current charging scene.
  • the charging time of the device reaches the charging limit, the charging of the electronic device can be stopped.
  • the present application can realize differentiated control of the charging limit duration for each charging scenario, so that when the electronic device is in the charging state, it can be charged according to the current specific charging status of the electronic device.
  • the charging time of electronic devices is reasonably limited, which avoids the situation that some scenarios cannot be fully charged due to short charging time, and also reduces the risk of battery damage in some scenarios due to long charging time.
  • FIG. 2 shows a schematic flowchart of a charging method provided by another embodiment of the present application.
  • the process shown in FIG. 2 will be described in detail below, and the charging method shown may specifically include the following steps:
  • Step S210 When the electronic device is in a charging state, determine the current charging scene.
  • the power consumption of the electronic device when the electronic device is in the standby state, the power consumption of the electronic device is very small, and when the electronic device is in the non-standby state, the power consumption of the electronic device is relatively large, so that the electronic device is in the standby state.
  • the charging speed of charging in the state is faster than that of charging in the non-standby state. Therefore, it is necessary to set different charging time limits according to different states of the electronic device. Specifically, please refer to FIG. 3.
  • the above-mentioned determination of the current charging scene may include:
  • Step S211 Detect a device state of the electronic device, where the device state includes a standby state or a non-standby state.
  • the device state of the electronic device may be determined by judging whether an application program is running in the foreground of the electronic device. Specifically, when an application program is running in the foreground of the electronic device, it indicates that the user may be currently using the electronic device. At this time, it can be considered that the electronic device is currently in a non-standby state. When the application program is not running in the foreground of the electronic device, it indicates that the user The electronic device may not be currently in use, and at this time, it may be considered that the electronic device is currently in a standby state.
  • the device state of the electronic device may also be determined by judging whether the screen state of the electronic device is the screen-off state. Specifically, when the screen state of the electronic device is a bright screen state, it indicates that the user may be currently using the electronic device, and it can be considered that the electronic device is currently in a non-standby state; when the screen state of the electronic device is a screen-off state, it indicates that the user The electronic device may not be currently in use, and it may be considered that the electronic device is currently in a standby state.
  • the power consumption is relatively low. Therefore, when the electronic device only runs low-power applications in the foreground, it can be considered equivalent to detecting When the electronic device is currently in a standby state, and when other applications except low-power applications are running in the foreground of the electronic device, it can be considered that it is detected that the electronic device is currently in a non-standby state.
  • Step S212 Determine the current charging scene according to the device state.
  • the current charging scene may be determined according to the device state of the electronic device.
  • the current charging scene is the standby charging scene, so that the charging of the electronic device can be controlled according to the charging limit time corresponding to the standby charging scene;
  • the current charging scene is a standby charging scene, so that the charging of the electronic device can be controlled subsequently according to the charging limit duration corresponding to the non-standby charging scene.
  • step S222 may include:
  • Step S2121 When the device state is the standby state, determine the type of charging device for charging the electronic device.
  • the current charging speed of the electronic device is mainly related to the charging current. Due to different charging devices, the charging current may be different. When different charging devices charge electronic devices, the time for the battery to be fully charged may also be different. Therefore, it is necessary to determine different charging scenarios according to different charging device types. Different charging scenarios can set different charging time limits to reduce the risk of damage to the battery when the charging speed is relatively fast.
  • the type of the charging device for charging the electronic device may be determined.
  • the charging device type can be an adapter charging type, a USB charging type, a wireless charger charging type, etc. Since different types of charging devices under the same charging type may also support different charging currents, the charging device types can be different types. Adapter charging types, different types of USB charging types, different types of wireless charger charging types, etc. are not limited here.
  • the above-mentioned determination of the type of the charging device for charging the electronic device may be to detect the voltage parameter of the charging interface of the electronic device, so as to determine the type of the charging device for charging the electronic device according to the specified voltage condition satisfied by the voltage parameter,
  • the voltage conditions corresponding to different charging device types are different.
  • the charging interface of the electronic device may be a Mini USB interface, a Micro USB interface, a Type-C interface, a Lighting interface, etc., but is not limited thereto. It can identify whether to use USB charging or adapter charging by detecting the difference in the voltage of each signal of the charging interface.
  • whether it is a wireless charger charging type can be determined by detecting whether the wireless communication module is turned on. It can be understood that, the charging current of the charging interface of the electronic device can also be detected to determine the type of charging device for charging the electronic device, which is not limited here.
  • the detection when detecting the charging voltage of the charging interface of the electronic device, the detection may be performed at intervals of a preset time period, or the detection may be performed in real time, which is not limited thereto.
  • ADC Analog-to-Digital Converter, analog-to-digital converter
  • sampling may be performed, and the charging voltage of the charging interface of the electronic device is sampled once at an interval of 2 ms (milliseconds).
  • Step S2122 Determine the current charging scene according to the type of the charging device.
  • a charging scene related to the charging device type may be determined as the current charging scene. For example, when it is determined that the charging device type is an adapter charging type, a USB charging type, or a wireless charger charging type, it is determined that the current charging scene is an adapter charging scene, a USB charging scene, or a wireless charger charging scene.
  • step S212 may further include:
  • Step S2123 When the device state is a non-standby state, determine the type of application currently running on the electronic device.
  • Step S2124 Determine the current charging scene according to the application type.
  • the charging speed is also different, so the current charging speed of the electronic device is related to both the charging current and the running application. Therefore, it is necessary to determine different charging scenarios according to the different types of applications running, so as to set different charging time limits according to the different charging scenarios to achieve precise regulation.
  • the type of the application currently running on the electronic device can be determined, so as to determine the current charging scene according to the type of the application.
  • the application type may be an audio type, a game type, an instant communication type, etc., which is not limited here.
  • the corresponding determined current charging scene may also be an audio charging scene, a game charging scene, an instant messaging charging scene, etc., which is not limited here.
  • Step S220 Determine the charging limit duration corresponding to the current charging scenario, wherein the charging limit duration corresponding to different charging scenarios is different.
  • Step S230 when the charging duration of the electronic device reaches the charging limit duration, stop charging the electronic device.
  • step S220 and step S230 reference may be made to the contents of the foregoing embodiments, and details are not repeated here.
  • the present application when the electronic device is in the charging state, the current charging scene is determined to determine the charging limit duration corresponding to the current charging scene.
  • the charging time of the device reaches the charging limit, the charging of the electronic device can be stopped.
  • the present application can realize differentiated control of the charging limit duration for each charging scenario, so that when the electronic device is in the charging state, it can be charged according to the current specific charging status of the electronic device.
  • the charging time of electronic devices is reasonably limited, which avoids the situation that some scenarios cannot be fully charged due to short charging time, and also reduces the risk of battery damage in some scenarios due to long charging time.
  • FIG. 6 shows a schematic flowchart of a charging method provided by another embodiment of the present application.
  • the process shown in FIG. 6 will be described in detail below, and the charging method shown may specifically include the following steps:
  • Step S310 Determine charging limit durations corresponding to different charging scenarios based on a preset reference charging duration, where the reference charging duration is used to represent the charging duration required when the electronic device is in a standby charging scenario.
  • a reference charging duration may be used as a standard to specifically measure the charging limit duration corresponding to different charging scenarios.
  • the charging duration required when the electronic device is in a standby charging scenario may be used as the above-mentioned reference charging duration, so as to determine the charging limitation duration corresponding to different charging scenarios.
  • the standby charging duration obtained by testing when the electronic device is in a standby charging scenario may be obtained as a preset reference charging duration. Therefore, the charging duration in the standby charging scenario can be tested to obtain a more realistic reference charging duration based on a large amount of experimental data. It is understandable that due to the relatively low power consumption in the standby charging scenario, the charging speed in the standby charging scenario is relatively fast. Therefore, other charging speeds with relatively slow charging speeds are determined according to the standby charging time in the standby charging scenario.
  • the charging limit time of the scene can at least ensure that the battery can be fully charged.
  • the corresponding charging limit time can also be determined according to the specific charging speed of other charging scenes, so as to reduce the risk of battery damage in different charging scenes.
  • the charging current in this scenario may be similar to the theoretical charging current of the electronic device. Therefore, it may also be based on the rated charging parameters and rated battery capacity of the electronic device. Determine the theoretical charging duration of the electronic device as a preset reference charging duration. Among them, the rated charging parameter and the rated battery capacity can be factory default parameters and can be obtained directly.
  • the above-mentioned electronic device is in a standby charging scenario, which may be a standby charging scenario when the electronic device is charging with a standard adapter, or a standby charging scenario where other charging devices are charging, which is not limited here. It can be understood that, according to the standby charging scenario of one of the charging devices, after obtaining the charging limit duration, the standby duration of the other charging devices can be calculated through the relationship between the current and the voltage.
  • step S310 may include:
  • Step S311 Determine a reference charging parameter of the electronic device based on a preset reference charging duration.
  • the reference charging parameter of the electronic device may be determined according to the above-mentioned preset reference charging duration.
  • the reference charging parameter may be a reference charging current, which may be determined by the battery capacity C of the electronic device and the reference charging duration A in the standby charging scenario. For example, by obtaining the ratio C/A of the battery capacity C and the reference charging duration A, the reference charging current B, that is, the average value of the standby charging current in the standby charging scenario, can be obtained.
  • Step S312 Detect actual charging parameters of the electronic device under different charging scenarios.
  • the actual charging parameters of the electronic device in different charging scenarios Due to the influence of the operating power consumption of the charging device and the electronic device, the actual charging parameters of the electronic device in different charging scenarios are also different. Therefore, the actual charging parameters of the electronic device in different charging scenarios can be detected. The difference between the parameters and the above reference charging parameters is used to determine the charging limit duration in different charging scenarios.
  • the actual charging parameter may be an actual charging current.
  • the running power consumption of the electronic device is relatively small, and the actual charging parameter of the electronic device at this time may be determined according to the current charging device type.
  • the actual charging parameters of the charging scene can be collected in real time by testing the standby adapter charging scene. It can be understood that, when the above-mentioned reference charging duration is obtained by testing in a charging scenario of a standby adapter, the above-mentioned reference charging parameters can be directly used as actual charging parameters. Therefore, the reference charging duration in the standby adapter charging scenario can be directly used as the charging limit duration in the standby adapter charging scenario.
  • the actual charging parameters of the charging scene can be collected in real time by testing the standby USB charging scene. Since the USB charging scene includes the CDP charging mode scene and the SDP charging mode scene, and the charging current of the CDP charging mode scene and the SDP charging mode scene are different, the charging current of the specific charging mode scene can be tested to determine the charging of the specific charging mode scene. Time limit. For example, if the average value E of the charging current in the test SDP charging mode scenario is: 500mA ⁇ E ⁇ 300mA, the minimum value of 300mA can be taken as the actual charging parameter of the SDP charging mode scenario.
  • step S312 may include:
  • Step S3121 When the electronic device is in the non-standby charging scene, detect the current usage power consumption of the electronic device.
  • Step S3122 Determine actual charging parameters of the electronic device in the non-standby charging scenario according to the power consumption.
  • the electronic device Since the electronic device is in a non-standby charging scenario, the electronic device will cause a relatively large consumption of battery power, so that the charging speed in this charging scenario will definitely be lower than the charging speed in the standby charging scenario. Therefore, when the electronic device is in the non-standby charging scenario, the current usage power consumption of the electronic device can be detected, so as to determine the actual charging parameters of the electronic device in the non-standby charging scenario according to the usage power consumption, so as to be offset The current parameter that is actually charged into the battery after the battery is depleted.
  • the power consumption of the electronic device when running different applications can also be obtained, so as to determine the charging of various application types. Actual charging parameters in the scene.
  • the charging current of the electronic device may be appropriately adjusted according to the different running applications. For example, when running high-power applications (such as game applications, etc.), the charging current will be increased to avoid affecting the use of electronic devices, while when running low-power applications, the normal charging current can be used for charging. Charge. Therefore, as a method, you can first test the charging parameters of the electronic device under various application types of charging scenarios, and then obtain the power consumption generated by the electronic device when running various applications, and subtract the charging parameters from the charging parameters. The actual charging parameters that the electronic device can actually charge into the battery under various application types of charging scenarios can be obtained by using the power consumption.
  • the current charging scene is a video charging scene
  • the average charging current M in the video charging scene can be obtained by testing.
  • M can be set by charging parameters, and can be tested and collected by multiple electronic devices.
  • the software can directly capture the current use power consumption G of the electronic device in the video charging scene, so that the difference M-G between the average charging current M and the use power consumption G in the video charging scene can be obtained as the electronic device.
  • Actual charging parameters in this video charging scenario is a video charging scene.
  • the actual charging parameters of the electronic device in the non-standby charging scenario can also be obtained by acquiring the charging parameters of the electronic device in the standby charging scenario, and subtracting the non-standby charging from the charging parameters in the standby charging scenario The usage power consumption in the scenario is determined.
  • the charging parameter of the electronic device in the standby charging scenario may be the above-mentioned reference charging parameter of the electronic device determined according to the preset reference charging duration (for example, uploading the reference charging current B); it may also be the rated charging parameter of the electronic device; It may also be the charging current set by the charging protocol in the currently used charger, which is not limited here.
  • Step S313 Determine the charging limit duration corresponding to different charging scenarios according to the reference charging duration, the reference charging parameters, and the actual charging parameters in the different charging scenarios.
  • the charging limit duration corresponding to different charging scenarios may be determined according to the difference between the reference charging parameters and the actual charging parameters. Specifically, the ratio of the reference charging parameter to the actual charging parameter of different charging scenarios can be obtained first, and then the product of the ratio and the reference charging duration can be obtained, and the product can be used as the charging limit duration of the corresponding charging scenario.
  • the actual charging parameter in the standby USB charging scenario is the average charging current E: 300mA
  • the ratio B/(M-G) of the reference charging current B to the actual charging parameter M-G can be obtained (reference charging parameter) first, and then the ratio B/E and the reference charging parameter M-G can be obtained.
  • step S310 may further include:
  • Step S314 Determine a delay parameter according to the battery performance parameter of the electronic device.
  • a delay parameter for delaying the reference charging duration may be determined according to a battery performance parameter of the electronic device.
  • the delay parameter may be a specific time value of the delay, or may be a time multiple of the delay, which is not limited here, and can be set reasonably according to the specific scene.
  • the battery performance parameter may be a parameter for evaluating the charging speed of the battery when the electronic device is in a relatively good charging environment, which may be the rated capacity of the battery, or when the electronic device is in a relatively good charging environment, How long to charge the battery to full capacity.
  • the battery performance parameter is the rated capacity of the battery, if the rated capacity of the battery is less than the preset capacity, it can indicate that the battery will be fully charged in a relatively short period of time.
  • the delay parameter can be determined, The above-obtained reference charging duration is extended according to the delay parameter.
  • a delay parameter may be determined to extend the obtained reference charging duration according to the delay parameter. For example, if the charging time when the battery capacity is fully charged is 0.5 hours, the delay parameter can be determined to be the time multiple n of the delay. Wherein, n can take 1.5 or 2, which is not limited here.
  • Step S315 Extend the preset reference charging duration based on the delay parameter.
  • the preset reference charging duration may be extended based on the delay parameter.
  • the extended reference charging duration may be nA, that is, n times the reference charging duration.
  • Step S316 Determine the charging limit duration corresponding to different charging scenarios according to the extended reference charging duration.
  • the charging limit duration corresponding to different charging scenarios may be determined according to the extended reference charging duration.
  • the reference charging duration A can be extended based on the delay parameter, and the extended reference charging duration A can be used as the standby adapter charging duration in the charging scenario.
  • the above-mentioned determination of the charging limit duration corresponding to different charging scenarios according to the reference charging duration, the reference charging parameters, and the actual charging parameters in the different charging scenarios may also be based on an extended reference
  • the charging time duration, the reference charging parameters, and the actual charging parameters in the different charging scenarios determine the charging limit duration corresponding to the different charging scenarios.
  • the actual charging parameter in the standby USB charging scenario is the average charging current E: 300mA
  • the product F can be used as the charging limit duration in the standby USB charging scenario.
  • the ratio B/(M-G) of the reference charging current B to the actual charging parameter M-G can be obtained (reference charging parameter) first, and then the ratio B/E and the reference charging parameter M-G can be obtained.
  • Step S320 When the electronic device is in the charging state, determine the current charging scene.
  • Step S330 Determine the charging limit duration corresponding to the current charging scenario, wherein the charging limit duration corresponding to different charging scenarios is different.
  • Step S340 when the charging duration of the electronic device reaches the charging limit duration, stop charging the electronic device.
  • FIG. 10 shows a schematic flowchart of a charging method of the present application.
  • the electronic device may determine the current specific charging scene when detecting that it is currently in the charging state, so as to obtain the corresponding charging limit duration according to the specific charging scene.
  • the charging scenario 1 shown in FIG. 10 corresponds to the charging limited duration D
  • the charging scenario 2 corresponds to the charging limited duration E
  • the charging scenario 3 corresponds to the charging limited duration F. Therefore, the electronic device can record the current charging duration in real time, so as to remind the user to stop charging after detecting that the charging duration is greater than the charging limit duration.
  • the charging method provided by the embodiment of the present application sets different charging time limits in different charging scenarios by using the reference charging duration of the standby charging scenario, which can ensure that the battery can be fully charged in each charging scenario and realize the charging of each charging scenario.
  • Differential control of limited duration so that when the electronic device is in the charging state, the charging duration of the electronic device can be reasonably limited according to the current specific charging scene of the electronic device, avoiding the inability of some scenarios due to the short charging duration. It also reduces the risk of battery damage due to longer charging times in some scenarios.
  • FIG. 11 shows a structural block diagram of a charging device 700 provided by an embodiment of the present application.
  • the charging device 700 includes a scene determination module 710 , a duration determination module 720 , and a charging control module 730 .
  • the scene determination module 710 is used to determine the current charging scene when the electronic device is in the charging state;
  • the duration determination module 720 is used to determine the charging limit duration corresponding to the current charging scene, wherein the charging limit duration corresponding to different charging scenarios Different;
  • the charging control module 730 is configured to stop charging the electronic device when the charging duration of the electronic device reaches the charging limit duration.
  • the charging apparatus 700 may further include: a duration preset module, configured to determine charging limit durations corresponding to different charging scenarios based on a preset reference charging duration, where the reference charging duration is used to characterize the The charging time required for the electronic device in the standby charging scenario.
  • a duration preset module configured to determine charging limit durations corresponding to different charging scenarios based on a preset reference charging duration, where the reference charging duration is used to characterize the The charging time required for the electronic device in the standby charging scenario.
  • the above-mentioned duration preset module may include: a reference calculation unit, an actual detection unit, and a duration calculation unit.
  • the reference calculation unit is used to determine the reference charging parameters of the electronic device based on the preset reference charging duration; the actual detection unit is used to detect the actual charging parameters of the electronic device under different charging scenarios; the duration calculation unit is used to According to the reference charging duration, the reference charging parameters, and the actual charging parameters in the different charging scenarios, the charging limit duration corresponding to the different charging scenarios is determined.
  • the above-mentioned charging scene may include a non-standby charging scene
  • the above-mentioned actual detection unit may be specifically configured to: when the electronic device is in the non-standby charging scene, detect the current usage power consumption of the electronic device ; According to the usage power consumption, determine the actual charging parameters of the electronic device in the non-standby charging scenario.
  • the charging apparatus 700 may further include: a first reference determination module, configured to acquire a standby charging duration obtained by testing when the electronic device is in a standby charging scenario, as a preset reference charging duration.
  • the charging apparatus 700 may further include: a second reference determination module, configured to determine the theoretical charging duration of the electronic device according to the rated charging parameters and rated battery capacity of the electronic device, as a preset reference Charging time.
  • a second reference determination module configured to determine the theoretical charging duration of the electronic device according to the rated charging parameters and rated battery capacity of the electronic device, as a preset reference Charging time.
  • the above-mentioned duration preset module may also be specifically used to: determine a delay parameter according to a battery performance parameter of the electronic device; extend a preset reference charging duration based on the delay parameter; The reference charging duration is determined by determining the charging limit duration corresponding to different charging scenarios.
  • the above-mentioned scene determination module 710 may include: a state detection unit and a scene judgment unit.
  • the state detection unit is used to detect the device state of the electronic device, and the device state includes a standby state or a non-standby state; the scene judgment unit is used to determine the current charging scene according to the device state.
  • the above scene determination unit may be specifically configured to: when the device state is a standby state, determine the type of the charging device for charging the electronic device; and determine the current charging scene according to the type of the charging device.
  • the above-mentioned scene determination unit may also be specifically configured to: when the device state is in a non-standby state, determine the type of application program currently running on the electronic device; and determine the current charging scene according to the application program type .
  • the coupling between the modules may be electrical, mechanical or other forms of coupling.
  • each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically alone, or two or more modules may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules.
  • the charging device provided in the embodiment of the present application is used to implement the corresponding charging method in the foregoing method embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
  • the electronic device 100 may be a terminal device capable of running an application program, such as a PC computer, a mobile terminal, or the like.
  • the electronic device 100 in the present application may include one or more of the following components: a processor 110, a memory 120, and one or more application programs, wherein the one or more application programs may be stored in the memory 120 and configured to be executed by One or more processors 110 execute, and one or more application programs are configured to execute the methods described in the foregoing method embodiments.
  • the processor 110 may include one or more processing cores.
  • the processor 110 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes by running or executing the instructions, programs, code sets or instruction sets stored in the memory 120, and calling the data stored in the memory 120.
  • the processor 110 may adopt at least one of a digital signal processing (Digital Signal Processing, DSP), a Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and a Programmable Logic Array (Programmable Logic Array, PLA). implemented in a hardware form.
  • DSP Digital Signal Processing
  • FPGA Field-Programmable Gate Array
  • PLA Programmable Logic Array
  • the processor 110 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a charger (Graphics Processing Unit, GPU), a modem, and the like.
  • a central processing unit Central Processing Unit, CPU
  • a charger Graphics Processing Unit, GPU
  • the modem is used to handle wireless communication. It can be understood that, the above-mentioned modem may also not be integrated into the processor 110, and is implemented by a communication chip alone.
  • the memory 120 may include random access memory (Random Access Memory, RAM), or may include read-only memory (Read-Only Memory). Memory 120 may be used to store instructions, programs, codes, sets of codes, or sets of instructions.
  • the memory 120 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.) , instructions for implementing the following method embodiments, and the like.
  • the storage data area may also store data (such as phone book, audio and video data, chat record data) created by the electronic device 100 during use.
  • FIG. 12 is only an example, and the electronic device 100 may further include more or less components than those shown in FIG. 12 , or have a completely different configuration from that shown in FIG. 12 .
  • This embodiment of the present application does not limit this.
  • FIG. 13 shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application.
  • the computer-readable medium 800 stores program codes, and the program codes can be invoked by the processor to execute the methods described in the above method embodiments.
  • the computer readable storage medium 800 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
  • the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium.
  • Computer readable storage medium 800 has storage space for program code 810 to perform any of the method steps in the above-described methods. These program codes can be read from or written to one or more computer program products.
  • Program code 810 may be compressed, for example, in a suitable form.

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Manufacturing & Machinery (AREA)
  • Chemical & Material Sciences (AREA)
  • Chemical Kinetics & Catalysis (AREA)
  • Electrochemistry (AREA)
  • General Chemical & Material Sciences (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

Disclosed are a charging method and apparatus, an electronic device, and a storage medium. The charging method comprises: determining a current charging scenario when an electronic device is in a charging state; determining a charging duration limit corresponding to the current charging scenario, wherein different charging scenarios correspond to different charging duration limits; and stopping charging of the electronic device when a charging duration of the electronic device reaches the charging duration limit. The method can realize differentiated control on charging duration limits corresponding to different charging scenarios.

Description

充电方法、装置、电子设备及存储介质Charging method, device, electronic device and storage medium
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请要求于2020年11月11日提交中国专利局的申请号为202011257881.7、名称为“充电方法、装置、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application No. 202011257881.7 and entitled "Charging Method, Apparatus, Electronic Equipment and Storage Medium" filed with the China Patent Office on November 11, 2020, the entire contents of which are incorporated herein by reference Applying.
技术领域technical field
本申请涉及电子设备技术领域,更具体地,涉及一种充电方法、装置、电子设备及存储介质。The present application relates to the technical field of electronic devices, and more particularly, to a charging method, device, electronic device, and storage medium.
背景技术Background technique
目前,各类电子设备基本都配置了电池,以供应电子设备使用所需的电能。由于长时间充电会影响电池的使用寿命,所以通常会在电子设备进行充电时,对充电时长进行限制,然而,现有的充电时长限制仍存在一些问题。At present, all kinds of electronic devices are basically equipped with batteries to supply the electrical energy required by the electronic devices. Since long-time charging will affect the service life of the battery, the charging time is usually limited when the electronic device is charged. However, the existing charging time limitation still has some problems.
发明内容SUMMARY OF THE INVENTION
鉴于上述问题,本申请提出了一种充电方法、装置、电子设备及存储介质,可改善上述问题。In view of the above problems, the present application proposes a charging method, an apparatus, an electronic device and a storage medium, which can improve the above problems.
第一方面,本申请实施例提供了一种充电方法,所述方法包括:当电子设备处于充电状态时,确定当前充电场景;确定与所述当前充电场景对应的充电限制时长,其中,不同充电场景对应的充电限制时长不同;当所述电子设备的充电时长达到所述充电限制时长时,停止对所述电子设备的充电。In a first aspect, an embodiment of the present application provides a charging method, the method includes: when an electronic device is in a charging state, determining a current charging scene; determining a charging limit duration corresponding to the current charging scene, wherein different charging The charging limitation durations corresponding to the scenarios are different; when the charging duration of the electronic device reaches the charging limitation duration, the charging of the electronic device is stopped.
第二方面,本申请实施例提供了一种充电装置,所述装置包括:场景确定模块,用于当电子设备处于充电状态时,确定当前充电场景;时长确定模块,用于确定与所述当前充电场景对应的充电限制时长,其中,不同充电场景对应的充电限制时长不同;充电控制模块,用于当所述电子设备的充电时长达到所述充电限制时长时,停止对所述电子设备的充电。In a second aspect, an embodiment of the present application provides a charging device, the device includes: a scene determination module for determining a current charging scene when the electronic device is in a charging state; a duration determination module for determining the current The charging limit duration corresponding to the charging scenario, wherein the charging limit duration corresponding to different charging scenarios is different; the charging control module is configured to stop the charging of the electronic device when the charging duration of the electronic device reaches the charging limit duration .
第三方面,本申请实施例提供了一种电子设备,包括:一个或多个处理器;存储器;一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个应用程序配置用于执行上述第一方面提供的充电方法。In a third aspect, embodiments of the present application provide an electronic device, comprising: one or more processors; a memory; and one or more application programs, wherein the one or more application programs are stored in the memory and Configured to be executed by the one or more processors, the one or more application programs are configured to execute the charging method provided by the first aspect.
第四方面,本申请实施例提供了一种计算机可读取存储介质,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行上述第一方面提供的充电方法。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where a program code is stored in the computer-readable storage medium, and the program code can be invoked by a processor to perform the charging provided in the first aspect above method.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述 中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the drawings that are used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, other drawings can also be obtained from these drawings without creative effort.
图1示出了根据本申请一个实施例的充电方法的一种流程图。FIG. 1 shows a flowchart of a charging method according to an embodiment of the present application.
图2示出了根据本申请另一个实施例的充电方法的一种流程图。FIG. 2 shows a flowchart of a charging method according to another embodiment of the present application.
图3示出了根据本申请另一个实施例的充电方法中步骤S210的一种流程图。FIG. 3 shows a flowchart of step S210 in the charging method according to another embodiment of the present application.
图4示出了根据本申请另一个实施例的充电方法中步骤S212的一种流程图。FIG. 4 shows a flowchart of step S212 in the charging method according to another embodiment of the present application.
图5示出了根据本申请另一个实施例的充电方法中步骤S212的另一种流程图。FIG. 5 shows another flowchart of step S212 in the charging method according to another embodiment of the present application.
图6示出了根据本申请又一个实施例的充电方法的一种流程图。FIG. 6 shows a flowchart of a charging method according to yet another embodiment of the present application.
图7示出了根据本申请又一个实施例的充电方法中步骤S310的一种流程图。FIG. 7 shows a flowchart of step S310 in the charging method according to still another embodiment of the present application.
图8示出了根据本申请又一个实施例的充电方法中步骤S312的一种流程图。FIG. 8 shows a flowchart of step S312 in the charging method according to another embodiment of the present application.
图9示出了根据本申请又一个实施例的充电方法中步骤S310的另一种流程图。FIG. 9 shows another flowchart of step S310 in the charging method according to still another embodiment of the present application.
图10示出了一种根据本申请实施例提供的充电方法的一种流程示意框图。FIG. 10 shows a schematic flowchart of a charging method according to an embodiment of the present application.
图11示出了根据本申请一个实施例的充电装置的一种框图。FIG. 11 shows a block diagram of a charging device according to an embodiment of the present application.
图12是本申请实施例的用于执行根据本申请实施例的充电方法的电子设备的框图。FIG. 12 is a block diagram of an electronic device for executing a charging method according to an embodiment of the present application according to an embodiment of the present application.
图13是本申请实施例的用于保存或者携带实现根据本申请实施例的充电方法的程序代码的存储单元。FIG. 13 is a storage unit for storing or carrying a program code for implementing the charging method according to the embodiment of the present application according to the embodiment of the present application.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。In order to make those skilled in the art better understand the solutions of the present application, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application.
目前,在对电子设备充电时,通常会有充电时长限制,且充电限制时长通常固定。例如将电子设备的充电限制时间统一设置为固定H小时。然而,随着电池容量的逐渐增大,部分电子设备的电池容量已经增大到5000mAhAt present, when charging an electronic device, there is usually a charging time limit, and the charging limit time is usually fixed. For example, the charging limit time of the electronic device is uniformly set to a fixed H hours. However, with the gradual increase of battery capacity, the battery capacity of some electronic devices has increased to 5000mAh
(Megawatt Hour,毫安时),甚至6000mAh,以后可能会更大,若设置充电限制时间为H小时,那么在一些充电电流比较小的场景(如USB CDP模式)下充电,大容量的电池是不能将电池充满的,而对于一些充电较快的场景,统一设置为H小时,对电池的保护也存在较大的风险。(Megawatt Hour, mAh), or even 6000mAh, it may be larger in the future. If the charging limit time is set to H hours, then in some scenarios with relatively small charging current (such as USB CDP mode), the large-capacity battery is The battery cannot be fully charged, and for some fast charging scenarios, it is uniformly set to H hours, which also poses a greater risk to the protection of the battery.
发明人经过长期的研究发现并提出了本申请实施例提供的充电方法、装置、电子设备以及存储介质,可对不同的充电场景设置不同的充电限制时长,以实现对每个充电场景的充电限制时长的差异化控制,避免了一刀 切,从而避免电流较小场景的电池不能充满的情况,同时也降低了较大充电电流场景中电池损坏的风险。具体的充电方法在后续的实施例中进行详细的说明。After long-term research, the inventor has discovered and proposed the charging method, device, electronic device, and storage medium provided by the embodiments of the present application, which can set different charging limit durations for different charging scenarios, so as to realize the charging limit for each charging scenario. The differentiated control of the duration avoids a one-size-fits-all approach, thereby avoiding the situation that the battery cannot be fully charged in a scenario with a small current, and at the same time reducing the risk of battery damage in a scenario with a large charging current. The specific charging method will be described in detail in the following embodiments.
请参阅图1,图1示出了本申请一个实施例提供的充电方法的流程示意图。在具体的实施例中,该充电方法可应用于如图11所示的充电装置700以及配置有所述充电装置700的电子设备(图12)。下面将针对图1所示的流程进行详细的阐述,所示充电方法具体可以包括以下步骤:Please refer to FIG. 1. FIG. 1 shows a schematic flowchart of a charging method provided by an embodiment of the present application. In a specific embodiment, the charging method can be applied to the charging apparatus 700 as shown in FIG. 11 and the electronic equipment ( FIG. 12 ) equipped with the charging apparatus 700 . The process shown in FIG. 1 will be described in detail below, and the charging method shown may specifically include the following steps:
步骤S110:当电子设备处于充电状态时,确定当前充电场景。Step S110: When the electronic device is in the charging state, determine the current charging scene.
在一些实施例中,电子设备中可包括用于检测电子设备是否处于充电状态的检测电路。作为一种方式,该检测电路可以识别充电接口中用于表示接入充电线的引脚的电平值,当该电平值为高电平时,则可以认为当前电子设备接入了充电设备,此时可认为检测到电子设备处于充电状态。作为另一种方式,检测电路还可以用于检测无线充电单元的线圈是否产生了一定频率的交流电,当线圈产生交流电时,则也可以认为该电子设备接入了充电设备,此时也可认为检测到电子设备处于充电状态。In some embodiments, the electronic device may include a detection circuit for detecting whether the electronic device is in a charged state. As a way, the detection circuit can identify the level value of the pin in the charging interface that is used to indicate the connection to the charging cable. When the level value is high, it can be considered that the current electronic device is connected to the charging device. At this time, it can be considered that the electronic device is detected to be in a charging state. As another way, the detection circuit can also be used to detect whether the coil of the wireless charging unit generates alternating current of a certain frequency. When the coil generates alternating current, it can also be considered that the electronic device is connected to the charging device. An electronic device is detected to be charging.
在另一些实施例中,也可通过电子设备的电源管理器BatteryManager来判断电子设备是否处于充电状态。例如,BatteryManager会广播电池单元的充电详细信息,该充电详细信息可包括电子设备是否处于充电状态,可以通过Intent获取到这些充电信息,以确定电子设备是否处于充电状态。In other embodiments, whether the electronic device is in a charging state can also be determined through the BatteryManager of the power manager of the electronic device. For example, the BatteryManager broadcasts the charging details of the battery unit, the charging details may include whether the electronic device is in a charging state, and the charging information can be obtained through an Intent to determine whether the electronic device is in a charging state.
在又一些实施例中,还可以通过电子设备提供的API(应用程序编程接口)来实现对电子设备是否处于充电状态的检测。例如在Android系统中可通过命令行mPluggedIn=updateMonitor.isDevicePluggedIn(),来检测电子设备是否处于充电状态。In still other embodiments, the detection of whether the electronic device is in a charging state can also be implemented through an API (application programming interface) provided by the electronic device. For example, in the Android system, the command line mPluggedIn=updateMonitor.isDevicePluggedIn() can be used to detect whether the electronic device is in a charging state.
可以理解的是,上述检测电子设备是否处于充电状态的方式仅为举例,具体的检测方式在本申请实施例中并不作限定。It can be understood that the above method of detecting whether the electronic device is in a charging state is only an example, and the specific detection method is not limited in the embodiments of the present application.
在本申请实施例中,当检测到电子设备处于充电状态时,可以确定当前充电场景。其中,充电场景可以是具有一定的充电速度的充电环境,也即不同的充电场景,充电速度不同。In this embodiment of the present application, when it is detected that the electronic device is in a charging state, the current charging scene can be determined. The charging scene may be a charging environment with a certain charging speed, that is, different charging scenes have different charging speeds.
由于不同的充电方式可能有着不同充电电流,使得不同充电方式的充电速度可能不同,因此,在一些实施例中,充电场景可以根据充电方式确定。其中,充电方式可以是有线充电方式和无线充电方式,有线充电方式需要将充电线的插头与电子设备上的充电接口进行插接,才能够对电子设备实现充电;无线充电方式需要将电子设备放置于无线充电设备上,甚至靠近无线充电设备的发射端,即可实现对电子设备的充电操作。作为一种实施方式,可以通过检测电子设备的充电接口上的电压变化,来确定电子设备是否采用有线充电方式,也可以通过检测无线通信模块是否开启,如蓝牙模块,来确定电子设备是否采用无线充电方式。当电子设备采用有线充电方式时,可以确定当前充电场景为有线充电场景,当电子设备采用无线充电方式时,可以确定当前充电场景为无线充电场景。Since different charging modes may have different charging currents, the charging speeds of different charging modes may be different. Therefore, in some embodiments, the charging scene may be determined according to the charging mode. Among them, the charging method can be a wired charging method and a wireless charging method. The wired charging method needs to plug the plug of the charging cable with the charging interface on the electronic device to be able to charge the electronic device; the wireless charging method needs to place the electronic device. On the wireless charging device, even close to the transmitter of the wireless charging device, the charging operation of the electronic device can be realized. As an embodiment, whether the electronic device adopts the wired charging mode can be determined by detecting the voltage change on the charging interface of the electronic device, and whether the electronic device adopts the wireless charging mode can also be determined by detecting whether the wireless communication module, such as the Bluetooth module, is turned on. charging method. When the electronic device adopts a wired charging method, it can be determined that the current charging scene is a wired charging scene, and when the electronic device adopts a wireless charging method, it can be determined that the current charging scene is a wireless charging scene.
由于不同的充电设备可能支持不同的充电协议,可能有着不同充电电流,使得不同充电设备的充电速度可能也不同,因此,在另一实施例中,充电场景也可以根据对电子设备充电的充电设备的类型确定。其中,充电设备的类型,可以是适配器充电类、USB充电类、type-c充电类、无线充电器充电类等。其中,适配器可以理解为使用出厂商配置标准电源适配器。由于适配器、无线充电器等也存在不同的类型,因此,充电设备的类型,可以是具体型号的适配器、USB、type-c无线充电器等充电类。从而可根据对电子设备充电的充电设备的类型,确定当前充电场景是否为适配器充电场景、USB充电场景、type-c充电场景、或无线充电器充电场景等。Since different charging devices may support different charging protocols and may have different charging currents, the charging speeds of different charging devices may also be different. Therefore, in another embodiment, the charging scene may also be based on the charging device that charges the electronic device. type is determined. Among them, the type of the charging device may be an adapter charging type, a USB charging type, a type-c charging type, a wireless charger charging type, and the like. Among them, the adapter can be understood as using the standard power adapter configured by the manufacturer. Since there are also different types of adapters, wireless chargers, etc., the type of charging device may be a specific type of adapter, USB, type-c wireless charger, and other charging types. Therefore, it can be determined whether the current charging scene is an adapter charging scene, a USB charging scene, a type-c charging scene, or a wireless charger charging scene, etc. according to the type of the charging device charging the electronic device.
由于电子设备运行不同的应用程序时,可能有着不同的电量消耗,使得电子设备的充电速度可能也不同,因此,在又一些实施例中,充电场景也可以是根据电子设备的设备状态来确定。其中,设备状态可包括待机状态和非待机状态。从而可根据电子设备的设备状态,来确定当前充电场景是否为待机充电场景或非待机充电场景。进一步地,当处于非待机状态下时,也可以是根据具体运行的应用程序类型确定当前充电场景。Since the electronic device may have different power consumption when running different application programs, the charging speed of the electronic device may also be different. Therefore, in other embodiments, the charging scene may also be determined according to the device state of the electronic device. The device state may include a standby state and a non-standby state. Therefore, according to the device state of the electronic device, it can be determined whether the current charging scene is a standby charging scene or a non-standby charging scene. Further, when in the non-standby state, the current charging scene may also be determined according to the type of the specific running application.
可以理解的是,上述充电场景的类型和确定当前充电场景的方式仅为举例,具体的充电场景类型和确定当前充电场景的方式在本申请实施例中并不作限定。It can be understood that the above-mentioned types of charging scenarios and methods for determining the current charging scenarios are only examples, and the specific types of charging scenarios and the methods for determining the current charging scenarios are not limited in the embodiments of the present application.
步骤S120:确定与所述当前充电场景对应的充电限制时长,其中,不同充电场景对应的充电限制时长不同。Step S120: Determine the charging limit duration corresponding to the current charging scenario, wherein the charging limit duration corresponding to different charging scenarios is different.
由于若统一设置充电限制时长,则电子设备在一些充电比较慢的场景下充电,大容量的电池是不能将电池充满的,而在一些充电较快的场景下充电,又增大了电池损坏的风险。因此,在本申请实施例中,可以对不同的充电场景设置不同的充电限制时长,以在保证电池充满的同时,也降低电池损害的风险。具体地,可以是在确定出当前充电场景后,确定与当前充电场景对应的充电限制时长,以根据该充电限制时长控制电子设备的充电过程。Because if the charging time limit is set uniformly, the electronic device will be charged in some slow charging scenarios, and the large-capacity battery cannot fully charge the battery, and charging in some fast charging scenarios will increase the damage to the battery. risk. Therefore, in the embodiment of the present application, different charging limit durations may be set for different charging scenarios, so as to ensure that the battery is fully charged and at the same time reduce the risk of battery damage. Specifically, after the current charging scene is determined, the charging limit duration corresponding to the current charging scene may be determined, so as to control the charging process of the electronic device according to the charging limit duration.
在一些实施例中,可以预先对各个充电场景的充电限制时长进行设置,从而电子设备每次充电时,可以根据当前的充电场景选择合适的充电限制时长进行控制。作为一种方式,可以在设置好充电参数以后,通过实验室测试得到各个充电场景的充电时长,然后根据测试得到的各个充电场景的充电时长,来设置充电限制时长。其中,该充电限制时长可以是大于测试得到的充电时长。例如,充电限制时长可以是测试得到的充电时长的1.5倍。也可以是等于测试得到的充电时长,在此并不作限定。In some embodiments, the charging limit duration of each charging scenario may be set in advance, so that each time the electronic device is charged, an appropriate charging limit duration may be selected and controlled according to the current charging scenario. As a method, after setting the charging parameters, the charging duration of each charging scene can be obtained through laboratory tests, and then the charging limit duration can be set according to the charging duration of each charging scene obtained by the test. Wherein, the charging limit duration may be greater than the charging duration obtained by testing. For example, the charging time limit can be 1.5 times the test charging time. It can also be equal to the charging time obtained by the test, which is not limited here.
步骤S130:当所述电子设备的充电时长达到所述充电限制时长时,停止对所述电子设备的充电。Step S130 : when the charging duration of the electronic device reaches the charging limit duration, stop charging the electronic device.
在本申请实施例中,电子设备在识别到当前充电场景,得到与当前充电场景对应的充电限制时长后,可以记录电子设备的充电时长,以在检测到电子设备的充电时长达到该充电限制时长时,可以停止对电子设备的充电。In the embodiment of the present application, after recognizing the current charging scene and obtaining the charging limit duration corresponding to the current charging scene, the electronic device may record the charging duration of the electronic device, so as to detect that the charging duration of the electronic device reaches the charging limit duration , you can stop charging the electronic device.
在一些实施例中,可以是通过电子设备的电源管理器BatteryManager来获取到电子设备的充电时长,也可以是通过计时器记录电子设备的充电时长,此处并不作限定。当获取到该电子设备的充电时长后,可以判断该充电时长是否小于上述确定的充电限制时长。当该充电时长小于上述确定的充电限制时长时,可以保持电子设备的充电状态,当该充电时长不小于上述确定的充电限制时长时,可以停止对电子设备的充电。In some embodiments, the charging duration of the electronic device may be obtained through the BatteryManager of the power manager of the electronic device, or the charging duration of the electronic device may be recorded through a timer, which is not limited herein. After the charging duration of the electronic device is acquired, it can be determined whether the charging duration is less than the charging limit duration determined above. When the charging duration is less than the above-determined charging limit duration, the charging state of the electronic device can be maintained, and when the charging duration is not less than the above-determined charging limit duration, charging the electronic device can be stopped.
在一些实施例中,当电子设备的充电时长达到充电限制时长时,也可以生成提醒信息,以提醒用户停止对电子设备的充电。进一步地,在检测到电子设备的充电时长达到充电限制后,若在预设时间段之后,仍检测到电子设备处于充电状态,可以自动断电或自动停止充电。例如,当电子设备当前的充电方式为蓝牙无线充电方式,电子设备的充电时长达到充电限制时,若在预设时间段之后,仍检测到电子设备处于充电状态,可以自动控制蓝牙无线通信模块关闭,从而自动停止对电子设备的充电。In some embodiments, when the charging duration of the electronic device reaches the charging limit duration, reminder information may also be generated to remind the user to stop charging the electronic device. Further, after it is detected that the charging time of the electronic device reaches the charging limit, if it is still detected that the electronic device is in a charging state after a preset period of time, the power can be automatically cut off or the charging can be stopped automatically. For example, when the current charging method of the electronic device is the Bluetooth wireless charging method, and the charging time of the electronic device reaches the charging limit, if it is still detected that the electronic device is in the charging state after the preset time period, the Bluetooth wireless communication module can be automatically controlled to turn off , which automatically stops charging the electronic device.
本申请实施例提供的充电方法,当电子设备处于充电状态时,通过确定当前充电场景,以确定与当前充电场景对应的充电限制时长,其中,不同充电场景对应的充电限制时长不同,从而当电子设备的充电时长达到该充电限制时长时,可以停止对电子设备的充电。本申请通过对不同的充电场景设置不同的充电限制时长,可以实现对每个充电场景的充电限制时长的差异化控制,从而在电子设备处于充电状态时,可根据电子设备当前具体所处的充电场景,对电子设备的充电时长进行合理限制,避免了某些场景因充电时长较小导致无法充满的情况,同时也降低了某些场景因充电时长较长导致电池损坏的风险。In the charging method provided by the embodiment of the present application, when the electronic device is in the charging state, the current charging scene is determined to determine the charging limit duration corresponding to the current charging scene. When the charging time of the device reaches the charging limit, the charging of the electronic device can be stopped. By setting different charging limit durations for different charging scenarios, the present application can realize differentiated control of the charging limit duration for each charging scenario, so that when the electronic device is in the charging state, it can be charged according to the current specific charging status of the electronic device. In some scenarios, the charging time of electronic devices is reasonably limited, which avoids the situation that some scenarios cannot be fully charged due to short charging time, and also reduces the risk of battery damage in some scenarios due to long charging time.
请参阅图2,图2示出了本申请另一个实施例提供的充电方法的流程示意图。下面将针对图2所示的流程进行详细的阐述,所示充电方法具体可以包括以下步骤:Please refer to FIG. 2, which shows a schematic flowchart of a charging method provided by another embodiment of the present application. The process shown in FIG. 2 will be described in detail below, and the charging method shown may specifically include the following steps:
步骤S210:当电子设备处于充电状态时,确定当前充电场景。Step S210: When the electronic device is in a charging state, determine the current charging scene.
在一些实施例中,由于电子设备在待机状态下时,电子设备对电量的消耗很小,而电子设备在非待机状态下时,电子设备对电量的消耗会比较大,从而使得电子设备在待机状态下充电的充电速度,要比在非待机状态下充电的充电速度快,因此,有必要根据电子设备的不同状态来设置不同的充电限制时长。具体的,请参阅图3,上述确定当前充电场景,可以包括:In some embodiments, when the electronic device is in the standby state, the power consumption of the electronic device is very small, and when the electronic device is in the non-standby state, the power consumption of the electronic device is relatively large, so that the electronic device is in the standby state. The charging speed of charging in the state is faster than that of charging in the non-standby state. Therefore, it is necessary to set different charging time limits according to different states of the electronic device. Specifically, please refer to FIG. 3. The above-mentioned determination of the current charging scene may include:
步骤S211:检测所述电子设备的设备状态,所述设备状态包括待机状态或者非待机状态。Step S211: Detect a device state of the electronic device, where the device state includes a standby state or a non-standby state.
在一些实施例中,可以是通过判断电子设备的前台是否运行有应用程序,来确定电子设备的设备状态。具体地,当电子设备的前台运行有应用程序时,表明用户当前可能正在使用电子设备,此时可认为检测到电子设备当前处于非待机状态,当电子设备的前台未运行应用程序时,表明用户当前可能未使用电子设备,此时可认为检测到电子设备当前处于待机状态。In some embodiments, the device state of the electronic device may be determined by judging whether an application program is running in the foreground of the electronic device. Specifically, when an application program is running in the foreground of the electronic device, it indicates that the user may be currently using the electronic device. At this time, it can be considered that the electronic device is currently in a non-standby state. When the application program is not running in the foreground of the electronic device, it indicates that the user The electronic device may not be currently in use, and at this time, it may be considered that the electronic device is currently in a standby state.
在另一些实施例中,也可以是通过判断电子设备的屏幕状态是否为熄 屏状态,来确定电子设备的设备状态。具体地,当电子设备的屏幕状态为亮屏状态时,表明用户当前可能正在使用电子设备,可认为检测到电子设备当前处于非待机状态;当电子设备的屏幕状态为熄屏状态时,表明用户当前可能未使用电子设备,可认为检测到电子设备当前处于待机状态。In other embodiments, the device state of the electronic device may also be determined by judging whether the screen state of the electronic device is the screen-off state. Specifically, when the screen state of the electronic device is a bright screen state, it indicates that the user may be currently using the electronic device, and it can be considered that the electronic device is currently in a non-standby state; when the screen state of the electronic device is a screen-off state, it indicates that the user The electronic device may not be currently in use, and it may be considered that the electronic device is currently in a standby state.
在还一些实施例中,由于存在一些低功耗的应用程序运行时,对电量的消耗比较低,因此,当电子设备的前台仅运行低功耗的应用程序时,此时可认为相当于检测到电子设备当前处于待机状态,而当电子设备的前台还运行有除低功耗的应用程序外的其他应用程序时,此时可认为检测到电子设备当前处于非待机状态。In still other embodiments, since there are some low-power applications running, the power consumption is relatively low. Therefore, when the electronic device only runs low-power applications in the foreground, it can be considered equivalent to detecting When the electronic device is currently in a standby state, and when other applications except low-power applications are running in the foreground of the electronic device, it can be considered that it is detected that the electronic device is currently in a non-standby state.
可以理解的是,上述设备状态的检测方式仅为举例,具体的设备状态检测方式在本申请实施例中并不作限定。It can be understood that the foregoing detection methods of the device status are only examples, and the specific device status detection methods are not limited in the embodiments of the present application.
步骤S212:根据所述设备状态,确定当前充电场景。Step S212: Determine the current charging scene according to the device state.
在一些实施例中,在检测到当前电子设备的设备状态后,可以根据电子设备的设备状态,确定当前充电场景。作为一种方式,可以是在检测到电子设备当前处于待机状态时,确定当前充电场景为待机充电场景,从而后续可根据待机充电场景对应的充电限制时长对电子设备的充电进行控制;在检测到电子设备当前处于非待机状态时,确定当前充电场景为待机充电场景,从而后续可根据非待机充电场景对应的充电限制时长对电子设备的充电进行控制。In some embodiments, after the device state of the current electronic device is detected, the current charging scene may be determined according to the device state of the electronic device. As a method, when it is detected that the electronic device is currently in the standby state, it is determined that the current charging scene is the standby charging scene, so that the charging of the electronic device can be controlled according to the charging limit time corresponding to the standby charging scene; When the electronic device is currently in a non-standby state, it is determined that the current charging scene is a standby charging scene, so that the charging of the electronic device can be controlled subsequently according to the charging limit duration corresponding to the non-standby charging scene.
作为另一种方式,可以是在确定出电子设备当前的设备状态为待机状态后,进一步根据该待机状态下具体的充电环境,来确定当前充电场景。具体的,请参阅图4,步骤S222可以包括:As another way, after it is determined that the current device state of the electronic device is the standby state, the current charging scene may be further determined according to the specific charging environment in the standby state. Specifically, referring to FIG. 4 , step S222 may include:
步骤S2121:当所述设备状态为待机状态时,确定为所述电子设备充电的充电设备类型。Step S2121: When the device state is the standby state, determine the type of charging device for charging the electronic device.
由于电子设备处于待机状态下时,电子设备对电池的电量消耗比较低,因此,电子设备当前的充电速度主要与充电电流有关。而由于不同的充电设备,充电电流有可能不同,当不同的充电设备对电子设备充电时,电池充满的时间也有可能不同,因此有必要根据不同的充电设备类型确定不同的充电场景,从而根据该不同的充电场景设置不同的充电限制时长,降低充电速度比较快时,对电池损害的风险。具体地,可以在设备状态为待机状态时,确定为对电子设备充电的充电设备类型。其中,充电设备类型可以是适配器充电类型、USB充电类型、无线充电器充电类型等,由于同一充电类型下不同型号的充电设备也有可能支持不同的充电电流,因此,充电设备类型可以是不同型号的适配器充电类型、不同型号的USB充电类型、不同型号的无线充电器充电类型等,此处并不作限定。Since the power consumption of the battery by the electronic device is relatively low when the electronic device is in a standby state, the current charging speed of the electronic device is mainly related to the charging current. Due to different charging devices, the charging current may be different. When different charging devices charge electronic devices, the time for the battery to be fully charged may also be different. Therefore, it is necessary to determine different charging scenarios according to different charging device types. Different charging scenarios can set different charging time limits to reduce the risk of damage to the battery when the charging speed is relatively fast. Specifically, when the device state is the standby state, the type of the charging device for charging the electronic device may be determined. Among them, the charging device type can be an adapter charging type, a USB charging type, a wireless charger charging type, etc. Since different types of charging devices under the same charging type may also support different charging currents, the charging device types can be different types. Adapter charging types, different types of USB charging types, different types of wireless charger charging types, etc. are not limited here.
在一些实施例中,上述确定为电子设备充电的充电设备类型,可以是检测电子设备的充电接口的电压参数,以根据电压参数所满足的指定电压条件,确定对电子设备充电的充电设备类型,其中,不同充电设备类型对应的电压条件不同。通常地,电子设备的充电接口可以是Mini USB接口、 Micro USB接口、Type-C接口、Lighting接口等,不限于此。可以通过检测充电接口各个信号的电压的差异,来识别出来是使用USB充电还是适配器充电。在一些实施例中,可以通过检测无线通信模块是否开启,来确定是否是无线充电器充电类型。可以理解的是,也可以检测电子设备的充电接口的充电电流,来确定对电子设备充电的充电设备类型,此处不作限定。In some embodiments, the above-mentioned determination of the type of the charging device for charging the electronic device may be to detect the voltage parameter of the charging interface of the electronic device, so as to determine the type of the charging device for charging the electronic device according to the specified voltage condition satisfied by the voltage parameter, The voltage conditions corresponding to different charging device types are different. Generally, the charging interface of the electronic device may be a Mini USB interface, a Micro USB interface, a Type-C interface, a Lighting interface, etc., but is not limited thereto. It can identify whether to use USB charging or adapter charging by detecting the difference in the voltage of each signal of the charging interface. In some embodiments, whether it is a wireless charger charging type can be determined by detecting whether the wireless communication module is turned on. It can be understood that, the charging current of the charging interface of the electronic device can also be detected to determine the type of charging device for charging the electronic device, which is not limited here.
在一些实施例中,在检测电子设备的充电接口的充电电压时,可以间隔预设时长进行检测,也可以实时进行检测,不限于此。例如,可以进行ADC(Analog-to-Digital Converter,模数转换器)采样,间隔2ms(毫秒)进行对电子设备的充电接口的充电电压进行采样一次。In some embodiments, when detecting the charging voltage of the charging interface of the electronic device, the detection may be performed at intervals of a preset time period, or the detection may be performed in real time, which is not limited thereto. For example, ADC (Analog-to-Digital Converter, analog-to-digital converter) sampling may be performed, and the charging voltage of the charging interface of the electronic device is sampled once at an interval of 2 ms (milliseconds).
步骤S2122:根据所述充电设备类型,确定当前充电场景。Step S2122: Determine the current charging scene according to the type of the charging device.
在一些实施例中,在确定出充电设备类型时,可以确定与该充电设备类型的充电场景作为当前充电场景。例如,在确定出充电设备类型为适配器充电类型、USB充电类型、或无线充电器充电类型时,确定当前充电场景为适配器充电场景、USB充电场景、或无线充电器充电场景。In some embodiments, when the charging device type is determined, a charging scene related to the charging device type may be determined as the current charging scene. For example, when it is determined that the charging device type is an adapter charging type, a USB charging type, or a wireless charger charging type, it is determined that the current charging scene is an adapter charging scene, a USB charging scene, or a wireless charger charging scene.
作为又一种方式,可以是在确定出电子设备当前的设备状态为非待机状态后,进一步根据该非待机状态下具体的充电环境,来确定当前充电场景。具体的,请参阅图5,步骤S212还可以包括:As another way, after it is determined that the current device state of the electronic device is a non-standby state, the current charging scene may be further determined according to a specific charging environment in the non-standby state. Specifically, referring to FIG. 5 , step S212 may further include:
步骤S2123:当所述设备状态为非待机状态时,确定所述电子设备当前运行的应用程序类型。Step S2123: When the device state is a non-standby state, determine the type of application currently running on the electronic device.
步骤S2124:根据所述应用程序类型,确定当前充电场景。Step S2124: Determine the current charging scene according to the application type.
在一些实施例中,由于运行不同的应用程序时,对电池电量的消耗不同,使得充电速度也不同,因此电子设备当前的充电速度与充电电流和运行的应用程序都有关。因此有必要根据运行的不同应用程序类型,确定不同的充电场景,从而根据该不同的充电场景设置不同的充电限制时长,实现精准调控。具体地,在设备状态为非待机状态时,可以确定电子设备当前运行的应用程序类型,以根据该应用程序类型,确定当前充电场景。其中,应用程序类型可以是音频类型、游戏类型、即使通信类型等,此处不作限定。对应确定的当前充电场景也可以是音频充电场景、游戏充电场景、即时通信充电场景等,此处不作限定。In some embodiments, due to the different consumption of battery power when running different applications, the charging speed is also different, so the current charging speed of the electronic device is related to both the charging current and the running application. Therefore, it is necessary to determine different charging scenarios according to the different types of applications running, so as to set different charging time limits according to the different charging scenarios to achieve precise regulation. Specifically, when the device state is in the non-standby state, the type of the application currently running on the electronic device can be determined, so as to determine the current charging scene according to the type of the application. The application type may be an audio type, a game type, an instant communication type, etc., which is not limited here. The corresponding determined current charging scene may also be an audio charging scene, a game charging scene, an instant messaging charging scene, etc., which is not limited here.
步骤S220:确定与所述当前充电场景对应的充电限制时长,其中,不同充电场景对应的充电限制时长不同。Step S220: Determine the charging limit duration corresponding to the current charging scenario, wherein the charging limit duration corresponding to different charging scenarios is different.
步骤S230:当所述电子设备的充电时长达到所述充电限制时长时,停止对所述电子设备的充电。Step S230 : when the charging duration of the electronic device reaches the charging limit duration, stop charging the electronic device.
在本申请实施例中,步骤S220和步骤S230可以参阅前述实施例的内容,此处不再赘述。In this embodiment of the present application, for step S220 and step S230, reference may be made to the contents of the foregoing embodiments, and details are not repeated here.
本申请实施例提供的充电方法,当电子设备处于充电状态时,通过确定当前充电场景,以确定与当前充电场景对应的充电限制时长,其中,不同充电场景对应的充电限制时长不同,从而当电子设备的充电时长达到该充电限制时长时,可以停止对电子设备的充电。本申请通过对不同的充电 场景设置不同的充电限制时长,可以实现对每个充电场景的充电限制时长的差异化控制,从而在电子设备处于充电状态时,可根据电子设备当前具体所处的充电场景,对电子设备的充电时长进行合理限制,避免了某些场景因充电时长较小导致无法充满的情况,同时也降低了某些场景因充电时长较长导致电池损坏的风险。In the charging method provided by the embodiment of the present application, when the electronic device is in the charging state, the current charging scene is determined to determine the charging limit duration corresponding to the current charging scene. When the charging time of the device reaches the charging limit, the charging of the electronic device can be stopped. By setting different charging limit durations for different charging scenarios, the present application can realize differentiated control of the charging limit duration for each charging scenario, so that when the electronic device is in the charging state, it can be charged according to the current specific charging status of the electronic device. In some scenarios, the charging time of electronic devices is reasonably limited, which avoids the situation that some scenarios cannot be fully charged due to short charging time, and also reduces the risk of battery damage in some scenarios due to long charging time.
请参阅图6,图6示出了本申请另一个实施例提供的充电方法的流程示意图。下面将针对图6所示的流程进行详细的阐述,所示充电方法具体可以包括以下步骤:Referring to FIG. 6 , FIG. 6 shows a schematic flowchart of a charging method provided by another embodiment of the present application. The process shown in FIG. 6 will be described in detail below, and the charging method shown may specifically include the following steps:
步骤S310:基于预先设置的参考充电时长,确定不同充电场景对应的充电限制时长,其中,所述参考充电时长用于表征所述电子设备处于待机充电场景时所需的充电时长。Step S310: Determine charging limit durations corresponding to different charging scenarios based on a preset reference charging duration, where the reference charging duration is used to represent the charging duration required when the electronic device is in a standby charging scenario.
在一些实施中,可以以一个参考充电时长为标准,具体衡量不同充电场景对应的充电限制时长。作为一种方式,可以是将电子设备处于待机充电场景时所需的充电时长,作为上述参考充电时长,从而确定出不同充电场景对应的充电限制时长。In some implementations, a reference charging duration may be used as a standard to specifically measure the charging limit duration corresponding to different charging scenarios. As a method, the charging duration required when the electronic device is in a standby charging scenario may be used as the above-mentioned reference charging duration, so as to determine the charging limitation duration corresponding to different charging scenarios.
在一些实施例中,可以是获取电子设备处于待机充电场景时测试得到的待机充电时长,作为预先设置的参考充电时长。从而可以对待机充电场景下的充电时长进行测试,以根据大量实验数据得到一个较为真实的参考充电时长。可以理解的是,由于待机充电场景下的电量消耗比较低,因此,待机充电场景下的充电速度比较快,因此,根据待机充电场景下的待机充电时长,来确定其他充电速度相对较慢的充电场景的充电限制时长,可以至少保证电池的电量可以充满,另外,也可以根据其他充电场景的具体的充电速度确定对应的充电限制时长,以降低不同充电场景下的电池损坏的风险。In some embodiments, the standby charging duration obtained by testing when the electronic device is in a standby charging scenario may be obtained as a preset reference charging duration. Therefore, the charging duration in the standby charging scenario can be tested to obtain a more realistic reference charging duration based on a large amount of experimental data. It is understandable that due to the relatively low power consumption in the standby charging scenario, the charging speed in the standby charging scenario is relatively fast. Therefore, other charging speeds with relatively slow charging speeds are determined according to the standby charging time in the standby charging scenario. The charging limit time of the scene can at least ensure that the battery can be fully charged. In addition, the corresponding charging limit time can also be determined according to the specific charging speed of other charging scenes, so as to reduce the risk of battery damage in different charging scenes.
在另一些实施例中,由于待机充电场景下的电量消耗比较低,该场景下的充电电流可能近似于电子设备理论充电电流,因此,也可以是根据电子设备的额定充电参数和额定电池容量,确定电子设备的理论充电时长,作为预先设置的参考充电时长。其中,额定充电参数和额定电池容量可以是出厂默认参数,可直接获取。In other embodiments, since the power consumption in the standby charging scenario is relatively low, the charging current in this scenario may be similar to the theoretical charging current of the electronic device. Therefore, it may also be based on the rated charging parameters and rated battery capacity of the electronic device. Determine the theoretical charging duration of the electronic device as a preset reference charging duration. Among them, the rated charging parameter and the rated battery capacity can be factory default parameters and can be obtained directly.
在一些实施例中,上述电子设备处于待机充电场景,可以是电子设备处于标配适配器充电时的待机充电场景,也可以是处于其他充电设备充电的待机充电场景,此处不作限定。可以理解的是,根据其中一种充电设备的待机充电场景,得到充电限制时长后,可以通过电流和电压的关系来计算出其他充电设备的待机时长。In some embodiments, the above-mentioned electronic device is in a standby charging scenario, which may be a standby charging scenario when the electronic device is charging with a standard adapter, or a standby charging scenario where other charging devices are charging, which is not limited here. It can be understood that, according to the standby charging scenario of one of the charging devices, after obtaining the charging limit duration, the standby duration of the other charging devices can be calculated through the relationship between the current and the voltage.
在一些实施例中,在得到上述参考充电时长后,可以根据各个充电场景的具体充电情况,来确定相应的充电限制时长。具体的,请参阅图7,步骤S310可以包括:In some embodiments, after obtaining the above reference charging duration, the corresponding charging limit duration may be determined according to the specific charging situation of each charging scenario. Specifically, referring to FIG. 7 , step S310 may include:
步骤S311:基于预先设置的参考充电时长,确定所述电子设备的参考充电参数。Step S311: Determine a reference charging parameter of the electronic device based on a preset reference charging duration.
在一些实施例中,可以根据上述预先设置的参考充电时长,确定出电子设备的参考充电参数。其中,参考充电参数可以是参考充电电流,可以通过电子设备的电池容量C和待机充电场景下的参考充电时长A确定。例如,通过获取电池容量C和参考充电时长A的比值C/A,即可得到参考充电电流B,也即待机充电场景下待机充电电流的平均值。In some embodiments, the reference charging parameter of the electronic device may be determined according to the above-mentioned preset reference charging duration. The reference charging parameter may be a reference charging current, which may be determined by the battery capacity C of the electronic device and the reference charging duration A in the standby charging scenario. For example, by obtaining the ratio C/A of the battery capacity C and the reference charging duration A, the reference charging current B, that is, the average value of the standby charging current in the standby charging scenario, can be obtained.
步骤S312:检测所述电子设备处于不同充电场景下的实际充电参数。Step S312: Detect actual charging parameters of the electronic device under different charging scenarios.
因充电设备、电子设备的运行功耗的影响,使得电子设备在不同的充电场景的实际充电参数也不同,因此,可以通过检测电子设备处于不同充电场景下的实际充电参数,以根据该实际充电参数与上述参考充电参数的差距,来确定出不同充电场景下的充电限制时长。其中,该实际充电参数可以是实际充电电流。Due to the influence of the operating power consumption of the charging device and the electronic device, the actual charging parameters of the electronic device in different charging scenarios are also different. Therefore, the actual charging parameters of the electronic device in different charging scenarios can be detected. The difference between the parameters and the above reference charging parameters is used to determine the charging limit duration in different charging scenarios. Wherein, the actual charging parameter may be an actual charging current.
在一些实施例中,当电子设备处于待机状态时,电子设备的运行功耗比较小,此时电子设备的实际充电参数可以是根据当前的充电设备类型确定。作为一种方式,当电子设备处于待机适配器充电场景时,可以通过测试待机适配器充电场景,来实时采集到该充电场景的实际充电参数。可以理解的是,当上述参考充电时长为待机适配器充电场景下测试得到时,可以直接将上述参考充电参数作为实际充电参数。从而可以直接将待机适配器充电场景下的参考充电时长作为将待机适配器充电场景下的充电限制时长。In some embodiments, when the electronic device is in a standby state, the running power consumption of the electronic device is relatively small, and the actual charging parameter of the electronic device at this time may be determined according to the current charging device type. As a method, when the electronic device is in the standby adapter charging scene, the actual charging parameters of the charging scene can be collected in real time by testing the standby adapter charging scene. It can be understood that, when the above-mentioned reference charging duration is obtained by testing in a charging scenario of a standby adapter, the above-mentioned reference charging parameters can be directly used as actual charging parameters. Therefore, the reference charging duration in the standby adapter charging scenario can be directly used as the charging limit duration in the standby adapter charging scenario.
作为另一种方式,当电子设备处于待机USB充电场景时,可以通过测试待机USB充电场景,来实时采集到该充电场景的实际充电参数。由于USB充电场景包括CDP充电模式场景和SDP充电模式场景,且CDP充电模式场景和SDP充电模式场景的充电电流不同,因此,可以测试具体充电模式场景的充电电流,来确定具体充电模式场景的充电限制时长。例如,若测试SDP充电模式场景下的充电电流平均值E为:500mA≥E≥300mA,可以取最小值为300mA作为该SDP充电模式场景的实际充电参数。As another way, when the electronic device is in the standby USB charging scene, the actual charging parameters of the charging scene can be collected in real time by testing the standby USB charging scene. Since the USB charging scene includes the CDP charging mode scene and the SDP charging mode scene, and the charging current of the CDP charging mode scene and the SDP charging mode scene are different, the charging current of the specific charging mode scene can be tested to determine the charging of the specific charging mode scene. Time limit. For example, if the average value E of the charging current in the test SDP charging mode scenario is: 500mA≥E≥300mA, the minimum value of 300mA can be taken as the actual charging parameter of the SDP charging mode scenario.
在一些实施例中,当电子设备处于非待机状态时,电子设备的运行功耗比较大,此时电子设备的实际充电参数可以是根据当前电子设备的运行功耗确定。具体的,请参阅图8,步骤S312可以包括:In some embodiments, when the electronic device is in a non-standby state, the operating power consumption of the electronic device is relatively large, and the actual charging parameter of the electronic device at this time may be determined according to the current operating power consumption of the electronic device. Specifically, referring to FIG. 8 , step S312 may include:
步骤S3121:当所述电子设备处于所述非待机充电场景时,检测所述电子设备当前产生的使用功耗。Step S3121: When the electronic device is in the non-standby charging scene, detect the current usage power consumption of the electronic device.
步骤S3122:根据所述使用功耗,确定所述电子设备处于所述非待机充电场景下的实际充电参数。Step S3122: Determine actual charging parameters of the electronic device in the non-standby charging scenario according to the power consumption.
由于电子设备处于非待机充电场景时,电子设备对电池的电量会造成比较大的消耗,使得在该充电场景下的充电速度一定会小于待机充电场景下的充电速度。因此,可以在电子设备处于所述非待机充电场景时,检测电子设备当前产生的使用功耗,以根据该使用功耗,确定电子设备处于非待机充电场景下的实际充电参数,从而可得到抵消掉电池电量消耗后实际充入电池的电流参数。Since the electronic device is in a non-standby charging scenario, the electronic device will cause a relatively large consumption of battery power, so that the charging speed in this charging scenario will definitely be lower than the charging speed in the standby charging scenario. Therefore, when the electronic device is in the non-standby charging scenario, the current usage power consumption of the electronic device can be detected, so as to determine the actual charging parameters of the electronic device in the non-standby charging scenario according to the usage power consumption, so as to be offset The current parameter that is actually charged into the battery after the battery is depleted.
在一些实施例中,当根据电子设备当前运行的应用程序类型,确定当前充电场景时,也可以获取运行不同应用程序时,电子设备各自产生的使用功耗,从而确定出各种应用程序类型充电场景下的实际充电参数。In some embodiments, when the current charging scene is determined according to the type of application currently running on the electronic device, the power consumption of the electronic device when running different applications can also be obtained, so as to determine the charging of various application types. Actual charging parameters in the scene.
由于在一些应用场景中,可能会根据运行的应用程序的不同,适当调整电子设备的充电电流。例如运行高功耗的应用程序(如游戏类应用程序等)时,会通过增大充电电流来避免影响电子设备的使用,而运行低功耗的应用程序时,就可以采用正常的充电电流进行充电。因此,作为一种方式,可以先测试得到电子设备在各种应用程序类型充电场景下的充电参数,然后获取运行各种应用程序时,电子设备各自产生的使用功耗,由该充电参数减去使用功耗即可得到电子设备在各种应用程序类型充电场景下实际能充入电池的实际充电参数。In some application scenarios, the charging current of the electronic device may be appropriately adjusted according to the different running applications. For example, when running high-power applications (such as game applications, etc.), the charging current will be increased to avoid affecting the use of electronic devices, while when running low-power applications, the normal charging current can be used for charging. Charge. Therefore, as a method, you can first test the charging parameters of the electronic device under various application types of charging scenarios, and then obtain the power consumption generated by the electronic device when running various applications, and subtract the charging parameters from the charging parameters. The actual charging parameters that the electronic device can actually charge into the battery under various application types of charging scenarios can be obtained by using the power consumption.
例如,当电子设备当前运行有视频类的应用程序时,则当前充电场景为视频充电场景,则可测试得到该视频充电场景下的平均充电电流M。其中,M可以是通过充电参数进行设置的,可以通过多个电子设备进行测试采集。然后再通过软件直接抓取该电子设备在该视频充电场景下当前产生的使用功耗G,从而可获取该视频充电场景下的平均充电电流M与使用功耗G的差值M-G,作为电子设备在该视频充电场景下的实际充电参数。For example, when the electronic device currently runs a video application, the current charging scene is a video charging scene, and the average charging current M in the video charging scene can be obtained by testing. Among them, M can be set by charging parameters, and can be tested and collected by multiple electronic devices. Then, the software can directly capture the current use power consumption G of the electronic device in the video charging scene, so that the difference M-G between the average charging current M and the use power consumption G in the video charging scene can be obtained as the electronic device. Actual charging parameters in this video charging scenario.
作为另一种方式,电子设备处于非待机充电场景下的实际充电参数,也可以是通过获取电子设备处于待机充电场景下的充电参数,并由该待机充电场景下的充电参数减去非待机充电场景下的使用功耗确定。其中,电子设备处于待机充电场景下的充电参数可以是上述根据预先设置的参考充电时长,确定出电子设备的参考充电参数(例如上传参考充电电流B);也可以是电子设备的额定充电参数;还可以是当前所使用的充电器中充电协议所设置的充电电流,此处不作限定。As another way, the actual charging parameters of the electronic device in the non-standby charging scenario can also be obtained by acquiring the charging parameters of the electronic device in the standby charging scenario, and subtracting the non-standby charging from the charging parameters in the standby charging scenario The usage power consumption in the scenario is determined. Wherein, the charging parameter of the electronic device in the standby charging scenario may be the above-mentioned reference charging parameter of the electronic device determined according to the preset reference charging duration (for example, uploading the reference charging current B); it may also be the rated charging parameter of the electronic device; It may also be the charging current set by the charging protocol in the currently used charger, which is not limited here.
步骤S313:根据所述参考充电时长、所述参考充电参数、以及所述不同充电场景下的实际充电参数,确定不同充电场景对应的充电限制时长。Step S313: Determine the charging limit duration corresponding to different charging scenarios according to the reference charging duration, the reference charging parameters, and the actual charging parameters in the different charging scenarios.
在一些实施例中,在获取到不同充电场景下的实际充电参数后,可以根据参考充电参数与实际充电参数的差异,确定出不同充电场景对应的充电限制时长。具体地,可以先获取参考充电参数与不同充电场景的实际充电参数的比值,然后获取该比值与参考充电时长的乘积,该乘积即可作为对应充电场景的充电限制时长。In some embodiments, after the actual charging parameters in different charging scenarios are acquired, the charging limit duration corresponding to different charging scenarios may be determined according to the difference between the reference charging parameters and the actual charging parameters. Specifically, the ratio of the reference charging parameter to the actual charging parameter of different charging scenarios can be obtained first, and then the product of the ratio and the reference charging duration can be obtained, and the product can be used as the charging limit duration of the corresponding charging scenario.
例如,当待机USB充电场景下的实际充电参数为充电电流平均值E:300mA时,可以先获取(参考充电参数)参考充电电流B与实际充电参数E的比值B/E,然后获取该比值B/E与参考充电时长A的乘积F=A*B/E=C/300,该乘积F即可作为待机USB充电场景下的充电限制时长。For example, when the actual charging parameter in the standby USB charging scenario is the average charging current E: 300mA, you can first obtain (refer to the charging parameter) the ratio B/E of the reference charging current B to the actual charging parameter E, and then obtain the ratio B The product of /E and the reference charging duration A is F=A*B/E=C/300, and the product F can be used as the charging limit duration in the standby USB charging scenario.
又例如,当视频充电场景下的实际充电参数为M-G时,可以先获取(参考充电参数)参考充电电流B与实际充电参数M-G的比值B/(M-G),然后获取该比值B/E与参考充电时长A的乘积I=A*B/(M-G)=C/(M-G),该乘积I即可作为视频充电场景下的充电限制时长。For another example, when the actual charging parameter in the video charging scenario is M-G, the ratio B/(M-G) of the reference charging current B to the actual charging parameter M-G can be obtained (reference charging parameter) first, and then the ratio B/E and the reference charging parameter M-G can be obtained. The product I of the charging duration A=A*B/(M-G)=C/(M-G), and the product I can be used as the charging limit duration in the video charging scenario.
在一些场景中,参考充电时长较短时,若根据该参考充电时长确定充电限制时长,得到充电限制时长也会比较短,从而可能会较早地停止电子设备的充电,而这对于长时间边使用电子设备边充电的情况而言,可能会频繁进行充电、停止充电然后又充电、又停止充电的流程,影响用户的使用体现。因此,在一些实施例中,还可以适当延长参考充电时长,以根据延长后的参考充电时长,确定充电限制时长。具体地,请参阅图9,步骤S310还可以包括:In some scenarios, when the reference charging time is short, if the charging limit time is determined according to the reference charging time, the obtained charging limit time will be relatively short, so that the charging of the electronic device may be stopped earlier. In the case of using an electronic device while charging, the process of charging, stopping charging, then charging again, and stopping charging may be performed frequently, which affects the user's performance. Therefore, in some embodiments, the reference charging duration may also be appropriately extended to determine the charging limitation duration according to the extended reference charging duration. Specifically, referring to FIG. 9 , step S310 may further include:
步骤S314:根据所述电子设备的电池性能参数,确定延时参数。Step S314: Determine a delay parameter according to the battery performance parameter of the electronic device.
在一些实施例中,可以根据将电子设备的电池性能参数,确定对参考充电时长进行延时的延时参数。其中,延时参数可以是具体延时的时间数值,也可以是延时的时间倍数,此处并不作限定,根据具体的场景合理设置即可。In some embodiments, a delay parameter for delaying the reference charging duration may be determined according to a battery performance parameter of the electronic device. The delay parameter may be a specific time value of the delay, or may be a time multiple of the delay, which is not limited here, and can be set reasonably according to the specific scene.
在一些实施例中,电池性能参数可以是用于评估电子设备处于比较好的充电环境下电池充电快慢的参数,其可以是电池额定容量,也可以是在电子设备处于比较好的充电环境时,将该电池容量充满的充电时长。此处不作限定。作为一种方式,当电池性能参数为电池额定容量时,若该电池额定容量小于预设容量,可表明该电池会在比较短的时间内充满,为了降低充电的频率,可以确定延时参数,以根据该延时参数对上述获取到的参考充电时长进行延长。作为另一种方式,当电池性能参数为将该电池容量充满的充电时长时,若该充电时长小于预设时长,可表明该电池会在比较短的时间内充满,为了降低充电的频率,也可以确定延时参数,以根据该延时参数对上述获取到的参考充电时长进行延长。例如,若该电池容量充满的充电时长为0.5小时,则可以确定延时参数为延时的时间倍数n。其中,n可取1.5或2,此处不作限定。In some embodiments, the battery performance parameter may be a parameter for evaluating the charging speed of the battery when the electronic device is in a relatively good charging environment, which may be the rated capacity of the battery, or when the electronic device is in a relatively good charging environment, How long to charge the battery to full capacity. There is no limitation here. As a method, when the battery performance parameter is the rated capacity of the battery, if the rated capacity of the battery is less than the preset capacity, it can indicate that the battery will be fully charged in a relatively short period of time. In order to reduce the frequency of charging, the delay parameter can be determined, The above-obtained reference charging duration is extended according to the delay parameter. As another method, when the battery performance parameter is the charging time for the battery to be fully charged, if the charging time is less than the preset time, it means that the battery will be fully charged in a relatively short period of time. In order to reduce the charging frequency, also A delay parameter may be determined to extend the obtained reference charging duration according to the delay parameter. For example, if the charging time when the battery capacity is fully charged is 0.5 hours, the delay parameter can be determined to be the time multiple n of the delay. Wherein, n can take 1.5 or 2, which is not limited here.
步骤S315:基于所述延时参数,延长预先设置的参考充电时长。Step S315: Extend the preset reference charging duration based on the delay parameter.
在一些实施例中,在确定了上述延时参数后,可以基于该延时参数,延长上述预先设置的参考充电时长。例如,延时参数为延时的时间倍数n时,延长后的参考充电时长可以是nA,也即n倍的参考充电时长。In some embodiments, after the delay parameter is determined, the preset reference charging duration may be extended based on the delay parameter. For example, when the delay parameter is the time multiple n of the delay, the extended reference charging duration may be nA, that is, n times the reference charging duration.
步骤S316:根据延长后的参考充电时长,确定不同充电场景对应的充电限制时长。Step S316: Determine the charging limit duration corresponding to different charging scenarios according to the extended reference charging duration.
在一些实施例中,在得到上述延长后的参考充电时长,可根据该延长后的参考充电时长,确定不同充电场景对应的充电限制时长。In some embodiments, after obtaining the above-mentioned extended reference charging duration, the charging limit duration corresponding to different charging scenarios may be determined according to the extended reference charging duration.
作为一种方式,当上述参考充电时长为待机适配器充电场景下测试得到时,可以基于延时参数,对该参考充电时长A进行延长,并将延长后的参考充电时长作为将待机适配器充电场景下的充电限制时长。例如,延时参数为延时的时间倍数n时,延长后的参考充电时长可以是nA,也即待机适配器充电场景下的充电限制时长可以是D=nA。在一些实施例中,当参考充电时长比较短时,也可以使该延长后的参考充电时长适当大于nA,从而使待机适配器充电场景下的充电限制时长可以是D≥nA。As a method, when the above-mentioned reference charging duration is obtained by testing in the standby adapter charging scenario, the reference charging duration A can be extended based on the delay parameter, and the extended reference charging duration A can be used as the standby adapter charging duration in the charging scenario. the charging time limit. For example, when the delay parameter is the delay time multiple n, the extended reference charging duration may be nA, that is, the charging limit duration in the standby adapter charging scenario may be D=nA. In some embodiments, when the reference charging duration is relatively short, the extended reference charging duration may be appropriately greater than nA, so that the charging limitation duration in the standby adapter charging scenario may be D≥nA.
在一些实施例中,上述根据所述参考充电时长、所述参考充电参数、以及所述不同充电场景下的实际充电参数,确定不同充电场景对应的充电限制时长,也可以是根据延长后的参考充电时长、所述参考充电参数、以及所述不同充电场景下的实际充电参数,确定不同充电场景对应的充电限制时长。In some embodiments, the above-mentioned determination of the charging limit duration corresponding to different charging scenarios according to the reference charging duration, the reference charging parameters, and the actual charging parameters in the different charging scenarios may also be based on an extended reference The charging time duration, the reference charging parameters, and the actual charging parameters in the different charging scenarios determine the charging limit duration corresponding to the different charging scenarios.
例如,当待机USB充电场景下的实际充电参数为充电电流平均值E:300mA时,可以先获取(参考充电参数)参考充电电流B与实际充电参数E的比值B/E,然后获取该比值B/E与延长后的参考充电时长nA的乘积F=nA*B/E=n C/300,该乘积F即可作为待机USB充电场景下的充电限制时长。在一些实施例中,当参考充电时长比较短时,也可以使该延长后的参考充电时长适当大于nA,从而可以使该待机USB充电场景下的充电限制时长F≥nA*B/E=n C/300。For example, when the actual charging parameter in the standby USB charging scenario is the average charging current E: 300mA, you can first obtain (refer to the charging parameter) the ratio B/E of the reference charging current B to the actual charging parameter E, and then obtain the ratio B The product of /E and the extended reference charging duration nA F=nA*B/E=n C/300, the product F can be used as the charging limit duration in the standby USB charging scenario. In some embodiments, when the reference charging duration is relatively short, the extended reference charging duration may be appropriately greater than nA, so that the charging limit duration F≥nA*B/E=n in the standby USB charging scenario C/300.
又例如,当视频充电场景下的实际充电参数为M-G时,可以先获取(参考充电参数)参考充电电流B与实际充电参数M-G的比值B/(M-G),然后获取该比值B/E与参考充电时长nA的乘积I=nA*B/(M-G)=nC/(M-G),该乘积I即可作为视频充电场景下的充电限制时长。在一些实施例中,当参考充电时长比较短时,也可以使该延长后的参考充电时长适当大于nA,从而可以使该视频充电场景下的充电限制时长I≥nA*B/E=n C/300。For another example, when the actual charging parameter in the video charging scenario is M-G, the ratio B/(M-G) of the reference charging current B to the actual charging parameter M-G can be obtained (reference charging parameter) first, and then the ratio B/E and the reference charging parameter M-G can be obtained. The product I=nA*B/(M-G)=nC/(M-G) of the charging duration nA, the product I can be used as the charging limit duration in the video charging scenario. In some embodiments, when the reference charging duration is relatively short, the extended reference charging duration can also be appropriately greater than nA, so that the charging limit duration I≥nA*B/E=nC in the video charging scenario /300.
可以理解的是,由于延长后的参考充电时长大于nA时,待机适配器充电场景下的充电限制时长可以是D≥nA,因此,可以推出F=D*B/E,I=D*B/(M-G)。也即,在得到待机适配器充电场景下的充电限制时长D后,可以根据该待机适配器充电场景下的充电限制时长D,计算其他充电场景的充电限制时长。It can be understood that when the extended reference charging duration is greater than nA, the charging limit duration in the standby adapter charging scenario can be D≥nA. Therefore, it can be deduced that F=D*B/E, I=D*B/( M-G). That is, after obtaining the charging limitation duration D in the standby adapter charging scenario, the charging limitation durations of other charging scenarios can be calculated according to the charging limitation duration D in the standby adapter charging scenario.
步骤S320:当电子设备处于充电状态时,确定当前充电场景。Step S320: When the electronic device is in the charging state, determine the current charging scene.
步骤S330:确定与所述当前充电场景对应的充电限制时长,其中,不同充电场景对应的充电限制时长不同。Step S330: Determine the charging limit duration corresponding to the current charging scenario, wherein the charging limit duration corresponding to different charging scenarios is different.
步骤S340:当所述电子设备的充电时长达到所述充电限制时长时,停止对所述电子设备的充电。Step S340 : when the charging duration of the electronic device reaches the charging limit duration, stop charging the electronic device.
在本申请实施例中,步骤S320~步骤S340可以参阅前述实施例的内容,此处不再赘述。In this embodiment of the present application, for steps S320 to S340, reference may be made to the contents of the foregoing embodiments, and details are not repeated here.
请参阅图10,图10示出了本申请的充电方法的一种流程框示意图。电子设备可以在检测到当前处于充电状态时,判断当前具体的充电场景,以根据具体的充电场景,获取到对应的充电限制时长。例如,图10所示的充电场景1对应充电限制时长D,充电场景2对应充电限制时长E,充电场景3对应充电限制时长F。从而电子设备可实时记录当前充电的时长,以在检测到充电时长大于充电限制时长后,提醒用户停止充电。Please refer to FIG. 10. FIG. 10 shows a schematic flowchart of a charging method of the present application. The electronic device may determine the current specific charging scene when detecting that it is currently in the charging state, so as to obtain the corresponding charging limit duration according to the specific charging scene. For example, the charging scenario 1 shown in FIG. 10 corresponds to the charging limited duration D, the charging scenario 2 corresponds to the charging limited duration E, and the charging scenario 3 corresponds to the charging limited duration F. Therefore, the electronic device can record the current charging duration in real time, so as to remind the user to stop charging after detecting that the charging duration is greater than the charging limit duration.
本申请实施例提供的充电方法,通过待机充电场景的参考充电时长,来设置不同充电场景下不同的充电限制时长,能够在保证各个充电场景下电池电量可以充满,实现对每个充电场景的充电限制时长的差异化控制, 从而在电子设备处于充电状态时,可根据电子设备当前具体所处的充电场景,对电子设备的充电时长进行合理限制,避免了某些场景因充电时长较小导致无法充满的情况,同时也降低了某些场景因充电时长较长导致电池损坏的风险。The charging method provided by the embodiment of the present application sets different charging time limits in different charging scenarios by using the reference charging duration of the standby charging scenario, which can ensure that the battery can be fully charged in each charging scenario and realize the charging of each charging scenario. Differential control of limited duration, so that when the electronic device is in the charging state, the charging duration of the electronic device can be reasonably limited according to the current specific charging scene of the electronic device, avoiding the inability of some scenarios due to the short charging duration. It also reduces the risk of battery damage due to longer charging times in some scenarios.
请参阅图11,其示出了本申请实施例提供的一种充电装置700的结构框图,该充电装置700包括:场景确定模块710、时长确定模块720以及充电控制模块730。其中,场景确定模块710用于当电子设备处于充电状态时,确定当前充电场景;时长确定模块720用于确定与所述当前充电场景对应的充电限制时长,其中,不同充电场景对应的充电限制时长不同;充电控制模块730用于当所述电子设备的充电时长达到所述充电限制时长时,停止对所述电子设备的充电。Please refer to FIG. 11 , which shows a structural block diagram of a charging device 700 provided by an embodiment of the present application. The charging device 700 includes a scene determination module 710 , a duration determination module 720 , and a charging control module 730 . The scene determination module 710 is used to determine the current charging scene when the electronic device is in the charging state; the duration determination module 720 is used to determine the charging limit duration corresponding to the current charging scene, wherein the charging limit duration corresponding to different charging scenarios Different; the charging control module 730 is configured to stop charging the electronic device when the charging duration of the electronic device reaches the charging limit duration.
在一些实施例中,充电装置700还可以包括:时长预设模块,用于基于预先设置的参考充电时长,确定不同充电场景对应的充电限制时长,其中,所述参考充电时长用于表征所述电子设备处于待机充电场景时所需的充电时长。In some embodiments, the charging apparatus 700 may further include: a duration preset module, configured to determine charging limit durations corresponding to different charging scenarios based on a preset reference charging duration, where the reference charging duration is used to characterize the The charging time required for the electronic device in the standby charging scenario.
在一些实施例中,上述时长预设模块可以包括:参考计算单元、实际检测单元以及时长计算单元。其中,参考计算单元用于基于预先设置的参考充电时长,确定所述电子设备的参考充电参数;实际检测单元用于检测所述电子设备处于不同充电场景下的实际充电参数;时长计算单元用于根据所述参考充电时长、所述参考充电参数、以及所述不同充电场景下的实际充电参数,确定不同充电场景对应的充电限制时长。In some embodiments, the above-mentioned duration preset module may include: a reference calculation unit, an actual detection unit, and a duration calculation unit. The reference calculation unit is used to determine the reference charging parameters of the electronic device based on the preset reference charging duration; the actual detection unit is used to detect the actual charging parameters of the electronic device under different charging scenarios; the duration calculation unit is used to According to the reference charging duration, the reference charging parameters, and the actual charging parameters in the different charging scenarios, the charging limit duration corresponding to the different charging scenarios is determined.
在一些实施例中,上述充电场景可以包括非待机充电场景,上述实际检测单元可以具体用于:当所述电子设备处于所述非待机充电场景时,检测所述电子设备当前产生的使用功耗;根据所述使用功耗,确定所述电子设备处于所述非待机充电场景下的实际充电参数。In some embodiments, the above-mentioned charging scene may include a non-standby charging scene, and the above-mentioned actual detection unit may be specifically configured to: when the electronic device is in the non-standby charging scene, detect the current usage power consumption of the electronic device ; According to the usage power consumption, determine the actual charging parameters of the electronic device in the non-standby charging scenario.
在一些实施例中,充电装置700还可以包括:第一参考确定模块,用于获取所述电子设备处于待机充电场景时测试得到的待机充电时长,作为预先设置的参考充电时长。In some embodiments, the charging apparatus 700 may further include: a first reference determination module, configured to acquire a standby charging duration obtained by testing when the electronic device is in a standby charging scenario, as a preset reference charging duration.
在一些实施例中,充电装置700还可以包括:第二参考确定模块,用于根据所述电子设备的额定充电参数和额定电池容量,确定所述电子设备的理论充电时长,作为预先设置的参考充电时长。In some embodiments, the charging apparatus 700 may further include: a second reference determination module, configured to determine the theoretical charging duration of the electronic device according to the rated charging parameters and rated battery capacity of the electronic device, as a preset reference Charging time.
在一些实施例中,上述时长预设模块也可以具体用于:根据所述电子设备的电池性能参数,确定延时参数;基于所述延时参数,延长预先设置的参考充电时长;根据延长后的参考充电时长,确定不同充电场景对应的充电限制时长。In some embodiments, the above-mentioned duration preset module may also be specifically used to: determine a delay parameter according to a battery performance parameter of the electronic device; extend a preset reference charging duration based on the delay parameter; The reference charging duration is determined by determining the charging limit duration corresponding to different charging scenarios.
在一些实施例中,上述场景确定模块710可以包括:状态检测单元以及场景判断单元。其中,状态检测单元用于检测所述电子设备的设备状态,所述设备状态包括待机状态或者非待机状态;场景判断单元用于根据所述设备状态,确定当前充电场景。In some embodiments, the above-mentioned scene determination module 710 may include: a state detection unit and a scene judgment unit. The state detection unit is used to detect the device state of the electronic device, and the device state includes a standby state or a non-standby state; the scene judgment unit is used to determine the current charging scene according to the device state.
在一些实施例中,上述场景判断单元可以具体用于:当所述设备状态为待机状态时,确定为所述电子设备充电的充电设备类型;根据所述充电设备类型,确定当前充电场景。In some embodiments, the above scene determination unit may be specifically configured to: when the device state is a standby state, determine the type of the charging device for charging the electronic device; and determine the current charging scene according to the type of the charging device.
在一些实施例中,上述场景判断单元也可以具体用于:当所述设备状态为非待机状态时,确定所述电子设备当前运行的应用程序类型;根据所述应用程序类型,确定当前充电场景。In some embodiments, the above-mentioned scene determination unit may also be specifically configured to: when the device state is in a non-standby state, determine the type of application program currently running on the electronic device; and determine the current charging scene according to the application program type .
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, for the specific working process of the above-described devices and modules, reference may be made to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,模块相互之间的耦合可以是电性,机械或其它形式的耦合。In several embodiments provided in this application, the coupling between the modules may be electrical, mechanical or other forms of coupling.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically alone, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules.
综上所述,本申请实施例提供的充电装置用于实现前述方法实施例中相应的充电方法,并具有相应的方法实施例的有益效果,在此不再赘述。To sum up, the charging device provided in the embodiment of the present application is used to implement the corresponding charging method in the foregoing method embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
请参考图12,其示出了本申请实施例提供的一种电子设备的结构框图。该电子设备100可以是PC电脑、移动终端等能够运行应用程序的终端设备。本申请中的电子设备100可以包括一个或多个如下部件:处理器110、存储器120以及一个或多个应用程序,其中,一个或多个应用程序可以被存储在存储器120中并被配置为由一个或多个处理器110执行,一个或多个应用程序配置用于执行如前述方法实施例所描述的方法。Please refer to FIG. 12 , which shows a structural block diagram of an electronic device provided by an embodiment of the present application. The electronic device 100 may be a terminal device capable of running an application program, such as a PC computer, a mobile terminal, or the like. The electronic device 100 in the present application may include one or more of the following components: a processor 110, a memory 120, and one or more application programs, wherein the one or more application programs may be stored in the memory 120 and configured to be executed by One or more processors 110 execute, and one or more application programs are configured to execute the methods described in the foregoing method embodiments.
处理器110可以包括一个或者多个处理核。处理器110利用各种接口和线路连接整个电子设备100内的各个部分,通过运行或执行存储在存储器120内的指令、程序、代码集或指令集,以及调用存储在存储器120内的数据,执行电子设备100的各种功能和处理数据。可选地,处理器110可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器110可集成中央处理器(Central Processing Unit,CPU)、充电器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器110中,单独通过一块通信芯片进行实现。The processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes by running or executing the instructions, programs, code sets or instruction sets stored in the memory 120, and calling the data stored in the memory 120. Various functions of the electronic device 100 and processing data. Optionally, the processor 110 may adopt at least one of a digital signal processing (Digital Signal Processing, DSP), a Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and a Programmable Logic Array (Programmable Logic Array, PLA). implemented in a hardware form. The processor 110 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a charger (Graphics Processing Unit, GPU), a modem, and the like. Among them, the CPU mainly handles the operating system, user interface and application programs, etc.; the GPU is used for rendering and drawing of the display content; the modem is used to handle wireless communication. It can be understood that, the above-mentioned modem may also not be integrated into the processor 110, and is implemented by a communication chip alone.
存储器120可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。存储器120可用于存储指令、程序、代码、代码集或指令集。存储器120可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一 个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等。存储数据区还可以存储电子设备100在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。The memory 120 may include random access memory (Random Access Memory, RAM), or may include read-only memory (Read-Only Memory). Memory 120 may be used to store instructions, programs, codes, sets of codes, or sets of instructions. The memory 120 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.) , instructions for implementing the following method embodiments, and the like. The storage data area may also store data (such as phone book, audio and video data, chat record data) created by the electronic device 100 during use.
可以理解,图12所示结构仅为示例,电子设备100还可以包括比图12所示更多或更少的组件,或是具有与图12所示完全不同的配置。本申请实施例对此没有限制。It can be understood that the structure shown in FIG. 12 is only an example, and the electronic device 100 may further include more or less components than those shown in FIG. 12 , or have a completely different configuration from that shown in FIG. 12 . This embodiment of the present application does not limit this.
请参考图13,其示出了本申请实施例提供的一种计算机可读存储介质的结构框图。该计算机可读介质800中存储有程序代码,所述程序代码可被处理器调用执行上述方法实施例中所描述的方法。Please refer to FIG. 13 , which shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application. The computer-readable medium 800 stores program codes, and the program codes can be invoked by the processor to execute the methods described in the above method embodiments.
计算机可读存储介质800可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读存储介质800包括非易失性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读存储介质800具有执行上述方法中的任何方法步骤的程序代码810的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码810可以例如以适当形式进行压缩。The computer readable storage medium 800 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium. Computer readable storage medium 800 has storage space for program code 810 to perform any of the method steps in the above-described methods. These program codes can be read from or written to one or more computer program products. Program code 810 may be compressed, for example, in a suitable form.
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不驱使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand: it can still be Modifications are made to the technical solutions described in the foregoing embodiments, or some technical features thereof are equivalently replaced; and these modifications or replacements do not drive the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions in the embodiments of the present application.

Claims (20)

  1. 一种充电方法,其特征在于,所述方法包括:A charging method, characterized in that the method comprises:
    当电子设备处于充电状态时,确定当前充电场景;When the electronic device is in the charging state, determine the current charging scene;
    确定与所述当前充电场景对应的充电限制时长,其中,不同充电场景对应的充电限制时长不同;determining a charging limit duration corresponding to the current charging scenario, wherein the charging limit duration corresponding to different charging scenarios is different;
    当所述电子设备的充电时长达到所述充电限制时长时,停止对所述电子设备的充电。When the charging time of the electronic device reaches the charging limit time, the charging of the electronic device is stopped.
  2. 根据权利要求1所述的方法,其特征在于,在所述确定与所述当前充电场景对应的充电限制时长之前,所述方法还包括:The method according to claim 1, wherein before the determining of the charging limit duration corresponding to the current charging scenario, the method further comprises:
    基于预先设置的参考充电时长,确定不同充电场景对应的充电限制时长,其中,所述参考充电时长用于表征所述电子设备处于待机充电场景时所需的充电时长。Based on a preset reference charging duration, the charging limit duration corresponding to different charging scenarios is determined, wherein the reference charging duration is used to represent the charging duration required when the electronic device is in a standby charging scenario.
  3. 根据权利要求2所述的方法,其特征在于,所述基于预先设置的参考充电时长,确定不同充电场景对应的充电限制时长,包括:The method according to claim 2, wherein determining the charging limit duration corresponding to different charging scenarios based on a preset reference charging duration, comprising:
    基于预先设置的参考充电时长,确定所述电子设备的参考充电参数;determining a reference charging parameter of the electronic device based on a preset reference charging duration;
    检测所述电子设备处于不同充电场景下的实际充电参数;Detecting actual charging parameters of the electronic device under different charging scenarios;
    根据所述参考充电时长、所述参考充电参数、以及所述不同充电场景下的实际充电参数,确定不同充电场景对应的充电限制时长。According to the reference charging duration, the reference charging parameters, and the actual charging parameters in the different charging scenarios, the charging limit duration corresponding to the different charging scenarios is determined.
  4. 根据权利要求3所述的方法,其特征在于,所述充电场景包括非待机充电场景,所述检测所述电子设备处于不同充电场景下的实际充电参数,包括:The method according to claim 3, wherein the charging scenario includes a non-standby charging scenario, and the detecting actual charging parameters of the electronic device under different charging scenarios comprises:
    当所述电子设备处于所述非待机充电场景时,检测所述电子设备当前产生的使用功耗;When the electronic device is in the non-standby charging scenario, detecting the current usage power consumption of the electronic device;
    根据所述使用功耗,确定所述电子设备处于所述非待机充电场景下的实际充电参数。According to the usage power consumption, an actual charging parameter of the electronic device in the non-standby charging scenario is determined.
  5. 根据权利要求4所述的方法,其特征在于,所述参考充电参数为参考充电电流,所述实际充电参数为实际充电电流。The method according to claim 4, wherein the reference charging parameter is a reference charging current, and the actual charging parameter is an actual charging current.
  6. 根据权利要求2-5任一项所述的方法,其特征在于,在所述基于预先设置的参考充电时长,确定不同充电场景对应的充电限制时长之前,所述方法还包括:The method according to any one of claims 2-5, wherein before determining the charging limit duration corresponding to different charging scenarios based on the preset reference charging duration, the method further comprises:
    获取所述电子设备处于待机充电场景时测试得到的待机充电时长,作为预先设置的参考充电时长。The standby charging duration obtained by testing when the electronic device is in a standby charging scenario is acquired as a preset reference charging duration.
  7. 根据权利要求2-5任一项所述的方法,其特征在于,在所述基于预先设置的参考充电时长,确定不同充电场景对应的充电限制时长之前,所述方法还包括:The method according to any one of claims 2-5, wherein before determining the charging limit duration corresponding to different charging scenarios based on the preset reference charging duration, the method further comprises:
    根据所述电子设备的额定充电参数和额定电池容量,确定所述电子设备的理论充电时长,作为预先设置的参考充电时长。According to the rated charging parameters and rated battery capacity of the electronic device, the theoretical charging duration of the electronic device is determined as a preset reference charging duration.
  8. 根据权利要求2-5任一项所述的方法,其特征在于,所述基于预先 设置的参考充电时长,确定不同充电场景对应的充电限制时长,包括:The method according to any one of claims 2-5, wherein, determining the charging limit duration corresponding to different charging scenarios based on the preset reference charging duration, comprising:
    根据所述电子设备的电池性能参数,确定延时参数;Determine the delay parameter according to the battery performance parameter of the electronic device;
    基于所述延时参数,延长预先设置的参考充电时长;Extending the preset reference charging duration based on the delay parameter;
    根据延长后的参考充电时长,确定不同充电场景对应的充电限制时长。According to the extended reference charging time, the charging limit time corresponding to different charging scenarios is determined.
  9. 根据权利要求8所述的方法,其特征在于,所述延时参数包括时间数值和时间倍数的至少一项。The method according to claim 8, wherein the delay parameter includes at least one of a time value and a time multiple.
  10. 根据权利要求8所述的方法,其特征在于,所述充电限制时长大于或等于所述参考充电时长。The method according to claim 8, wherein the charging limit duration is greater than or equal to the reference charging duration.
  11. 根据权利要求1-5任一项所述的方法,其特征在于,所述确定当前充电场景,包括:The method according to any one of claims 1-5, wherein the determining the current charging scene comprises:
    检测所述电子设备的设备状态,所述设备状态包括待机状态或者非待机状态;Detecting the device state of the electronic device, the device state includes a standby state or a non-standby state;
    根据所述设备状态,确定当前充电场景。According to the device state, the current charging scene is determined.
  12. 根据权利要求11所述的方法,其特征在于,所述根据所述设备状态,确定当前充电场景,包括:The method according to claim 11, wherein the determining the current charging scene according to the device state comprises:
    当所述设备状态为待机状态时,确定为所述电子设备充电的充电设备类型;When the device state is the standby state, determining the type of charging device for charging the electronic device;
    根据所述充电设备类型,确定当前充电场景。According to the charging device type, the current charging scene is determined.
  13. 根据权利要求12所述的方法,其特征在于,所述当所述设备状态为待机状态时,确定为所述电子设备充电的充电设备类型,包括:The method according to claim 12, wherein, when the device state is a standby state, determining a type of charging device for charging the electronic device comprises:
    当所述设备状态为待机状态时,基于所述电子设备充电的电压和电流中至少一项来确定所述电子设备的充电类型。When the device state is the standby state, the charging type of the electronic device is determined based on at least one of a voltage and a current charged by the electronic device.
  14. 根据权利要求11所述的方法,其特征在于,所述根据所述设备状态,确定当前充电场景,包括:The method according to claim 11, wherein the determining the current charging scene according to the device state comprises:
    当所述设备状态为非待机状态时,确定所述电子设备当前运行的应用程序类型;When the device state is a non-standby state, determining the type of application currently running on the electronic device;
    根据所述应用程序类型,确定当前充电场景。According to the application type, the current charging scene is determined.
  15. 根据权利要求14所述的方法,其特征在于,所述当所述设备状态为非待机状态时,确定所述电子设备当前运行的应用程序类型,包括:The method according to claim 14, wherein, when the device state is a non-standby state, determining the type of application program currently running on the electronic device comprises:
    当所述设备状态为非待机状态时,基于应用程序对电池电量的消耗量来确定所述电子设备当前运行的应用程序类型。When the device state is a non-standby state, the type of application program currently running on the electronic device is determined based on the consumption of battery power by the application program.
  16. 根据权利要求1所述的方法,其特征在于,所述电子设备的充电方式为蓝牙无线充电方式,所述当所述电子设备的充电时长达到所述充电限制时长时,停止对所述电子设备的充电,包括:The method according to claim 1, wherein the charging method of the electronic device is a Bluetooth wireless charging method, and when the charging time of the electronic device reaches the charging limit time, stop charging the electronic device. charging, including:
    当所述电子设备的充电时长达到所述充电限制时长时,若在预设时间段之后,仍检测到电子设备处于充电状态,控制所述电子设备的蓝牙无线通信模块关闭,以停止对所述电子设备的充电。When the charging duration of the electronic device reaches the charging limit duration, if it is still detected that the electronic device is in a charging state after a preset time period, the Bluetooth wireless communication module of the electronic device is controlled to be turned off to stop the charging of the electronic device. Charging of electronic devices.
  17. 根据权利要求1所述的方法,其特征在于,所述当所述电子设备的充电时长达到所述充电限制时长时,停止对所述电子设备的充电,包括:The method according to claim 1, wherein when the charging time of the electronic device reaches the charging limit time, stopping the charging of the electronic device comprises:
    记录所述电子设备的充电时长;record the charging time of the electronic device;
    当所述电子设备的充电时长达到所述充电限制时长时,停止对所述电子设备的充电。When the charging time of the electronic device reaches the charging limit time, the charging of the electronic device is stopped.
  18. 一种充电装置,其特征在于,所述装置包括:A charging device, characterized in that the device comprises:
    场景确定模块,用于当电子设备处于充电状态时,确定当前充电场景;The scene determination module is used to determine the current charging scene when the electronic device is in the charging state;
    时长确定模块,用于确定与所述当前充电场景对应的充电限制时长,其中,不同充电场景对应的充电限制时长不同;a duration determination module, configured to determine a charging limit duration corresponding to the current charging scenario, wherein the charging restriction duration corresponding to different charging scenarios is different;
    充电控制模块,用于当所述电子设备的充电时长达到所述充电限制时长时,停止对所述电子设备的充电。A charging control module, configured to stop charging the electronic device when the charging time of the electronic device reaches the charging limit time.
  19. 一种电子设备,其特征在于,包括:An electronic device, comprising:
    一个或多个处理器;one or more processors;
    存储器;memory;
    一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个应用程序配置用于执行如权利要求1-17任一项所述的方法。one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, the one or more application programs are configured to execute The method of any of claims 1-17.
  20. 一种计算机可读取存储介质,其特征在于,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行如权利要求1-17任一项所述的方法。A computer-readable storage medium, wherein a program code is stored in the computer-readable storage medium, and the program code can be invoked by a processor to execute the method according to any one of claims 1-17 .
PCT/CN2021/117204 2020-11-11 2021-09-08 Charging method and apparatus, electronic device, and storage medium WO2022100245A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011257881.7A CN112448447B (en) 2020-11-11 2020-11-11 Charging method, charging device, electronic equipment and storage medium
CN202011257881.7 2020-11-11

Publications (1)

Publication Number Publication Date
WO2022100245A1 true WO2022100245A1 (en) 2022-05-19

Family

ID=74736858

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/117204 WO2022100245A1 (en) 2020-11-11 2021-09-08 Charging method and apparatus, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN112448447B (en)
WO (1) WO2022100245A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112448447B (en) * 2020-11-11 2023-09-29 RealMe重庆移动通信有限公司 Charging method, charging device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8380999B1 (en) * 2010-12-20 2013-02-19 Amazon Technologies, Inc. Power management for electronic devices
CN105990866A (en) * 2015-02-10 2016-10-05 深圳酷派技术有限公司 Charging method, device and terminal thereof
CN107181298A (en) * 2017-05-26 2017-09-19 珠海市魅族科技有限公司 Charge control method, device, terminal installation and storage medium
CN111063955A (en) * 2019-12-27 2020-04-24 Oppo广东移动通信有限公司 Charging method and device, equipment and storage medium
CN112448447A (en) * 2020-11-11 2021-03-05 RealMe重庆移动通信有限公司 Charging method, charging device, electronic device and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104810870B (en) * 2014-01-24 2017-05-17 宇龙计算机通信科技(深圳)有限公司 Charging prompting device and charging prompting method
CN106877464A (en) * 2017-04-24 2017-06-20 知谷(上海)网络科技有限公司 Charge control method and charging equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8380999B1 (en) * 2010-12-20 2013-02-19 Amazon Technologies, Inc. Power management for electronic devices
CN105990866A (en) * 2015-02-10 2016-10-05 深圳酷派技术有限公司 Charging method, device and terminal thereof
CN107181298A (en) * 2017-05-26 2017-09-19 珠海市魅族科技有限公司 Charge control method, device, terminal installation and storage medium
CN111063955A (en) * 2019-12-27 2020-04-24 Oppo广东移动通信有限公司 Charging method and device, equipment and storage medium
CN112448447A (en) * 2020-11-11 2021-03-05 RealMe重庆移动通信有限公司 Charging method, charging device, electronic device and storage medium

Also Published As

Publication number Publication date
CN112448447A (en) 2021-03-05
CN112448447B (en) 2023-09-29

Similar Documents

Publication Publication Date Title
EP3349324B1 (en) Charging control method, charging control device and terminal
WO2020239114A1 (en) Charging method and apparatus, charging system, electronic device, storage medium
CN105979103B (en) Battery power guarantee method and device for portable electronic product and mobile terminal
CN106507445B (en) Wireless fidelity Wi-Fi scanning method and mobile terminal
CN112540304B (en) Battery power management method, electronic device and computer storage medium
CN110085934B (en) Charging method of terminal battery and mobile terminal
CN104716750B (en) A kind of low power consuming wireless power method and relevant apparatus, system
US20170358931A1 (en) Charging method and electronic device
CN108879847A (en) Wireless headset charging system and wireless headset charging method
CN105137831B (en) Energy-saving mode open method and device
US20160224100A1 (en) Method and device for processing core of processor , and terminal
CN103685730B (en) The communication control method of a kind of mobile terminal and mobile terminal thereof
WO2022100245A1 (en) Charging method and apparatus, electronic device, and storage medium
US10705585B2 (en) Battery charge leakage monitor
CN104635164A (en) Battery charging and discharging stability testing method of intelligent terminal and intelligent terminal
CN106981696B (en) Charging method for battery, electronic equipment and charger
CN110650400A (en) Wireless earphone and low-power-consumption method, device and system thereof
CN109067416A (en) A kind of method and Intelligent hardware for realizing SIM card hot plug and starting
CN111103963A (en) Fingerprint module starting method and device, storage medium and terminal
WO2018210146A1 (en) Charging method for charging device, and charging device
CN104243683A (en) Data processing method, terminal, user identification card and data processing system
CN112332499A (en) Charging control method, system, charging box and storage medium
CN103888556B (en) A kind of control method of domestic terminal apparatus and domestic terminal apparatus
CN109905803B (en) Microphone array switching method and device, storage medium and computer equipment
CN103747131A (en) Mobile terminal power state monitoring method and mobile terminal

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21890773

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21890773

Country of ref document: EP

Kind code of ref document: A1