Charging method and device, electronic equipment and storage medium

By monitoring the bright screen information during the charging process of electronic devices, switching charging modes and adjusting charging parameters, the problem of excessive battery heating caused by fast charging and too slow charging speed by slow charging is solved, achieving a balance between battery charging protection and user needs.

CN119341139APending Publication Date: 2025-01-21BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310890947.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-19
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

The existing charging technology causes the battery to generate a large amount of heat during fast charging, affecting the battery life, and the slow charging speed is too slow to meet the user's immediate use needs.

Method used

By monitoring the screen-on information during the charging process of electronic devices, switching charging modes according to the number and duration of screen-on times, and adjusting charging parameters to achieve a balance between battery charging protection and user needs.

Benefits of technology

Effectively balances battery charging protection and charging speed, extending battery life while meeting users' fast charging needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119341139A_ABST
    Figure CN119341139A_ABST
Patent Text Reader

Abstract

The invention provides a charging method and device, electronic equipment and a storage medium, the method is executed by the electronic equipment, and the method comprises the following steps: in the charging process of the electronic equipment, the electronic equipment turns on a screen; and switching the charging mode of the electronic equipment to adjust the charging parameters of the electronic equipment according to the bright screen information of the bright screen of the electronic equipment and the current charging mode of the electronic equipment. By adopting the scheme, whether the user has the requirement of using the electronic equipment or not can be determined according to the screen-on information of the electronic equipment, and when it is determined that the user has the use requirement of the electronic equipment, the charging parameters can be adjusted by switching the charging mode, so that the balance between the battery charging protection of the electronic equipment and the user requirement is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of charging technology, and in particular to a charging method, device, electronic device and storage medium. Background Art

[0002] As people's pace of life accelerates, the demand for fast charging of mobile phones is becoming stronger and stronger. However, the fast charging process generates a lot of heat due to the high charging current and / or charging voltage, which affects the battery life. Although slow charging is less harmful to mobile phone batteries, it takes a long time to charge due to the low charging current and charging voltage. When users need to use their mobile phones, the charging speed cannot meet their needs, affecting the user experience. Summary of the invention

[0003] Embodiments of the present application provide a charging method, device, electronic device, and storage medium.

[0004] According to a first aspect of an embodiment of the present application, a charging method is provided, which is performed by an electronic device and includes:

[0005] During the charging process of the electronic device, the screen of the electronic device turns on;

[0006] According to the screen-on information of the electronic device and the current charging mode of the electronic device, the charging mode of the electronic device is switched to adjust the charging parameters of the electronic device.

[0007] Optionally, switching the charging mode of the electronic device to adjust the charging parameters of the electronic device according to the screen-on information of the electronic device and the current charging mode of the electronic device includes:

[0008] Determining whether a charging mode switching condition is met according to screen-on information of the electronic device;

[0009] According to whether the charging mode switching condition is met and the current charging mode, it is determined whether to switch the charging mode of the electronic device to a target mode, wherein different charging modes correspond to different charging parameters.

[0010] Optionally, determining whether to switch the charging mode of the electronic device to a target mode according to whether the charging mode switching condition and the current charging mode are satisfied includes at least one of the following:

[0011] When the charging mode switching condition is met and the current charging mode is the first charging mode, switching the charging mode of the electronic device to the second charging mode; wherein the charging parameter of the second charging mode is less than the charging parameter of the first charging mode;

[0012] When the charging mode switching condition is not met and the current charging mode is the first charging mode, the charging mode of the electronic device is switched to a third charging mode, wherein a charging parameter of the third charging mode is greater than a charging parameter of the first charging mode and less than a charging parameter of the second charging mode.

[0013] Optionally, the method further comprises:

[0014] When the charging mode switching condition is met and the current charging mode is the third charging mode, the charging mode of the electronic device is switched to the second charging mode.

[0015] Optionally, the method further comprises:

[0016] In response to the charging protection mode being turned on, determining whether the charging start time is within a preset time period;

[0017] If it is determined that the charging start time is within a preset time period, obtaining the number of times the electronic device is charged in a preset charging state during the historical period, wherein the preset charging state is used to indicate that the number of times the screen of the electronic device is turned on during one charging process is less than or equal to a first preset number of times, and the screen-on duration is less than or equal to the first preset duration;

[0018] When the number of times the electronic device is charged in the preset charging state is greater than or equal to a preset value, the electronic device is controlled to charge in the first charging mode.

[0019] Optionally, the method further comprises:

[0020] Obtaining a charging duration of the electronic device during a charging process, as well as the number of times and duration of screen lighting during the charging duration;

[0021] In response to the charging duration being within the preset time period, when the screen-on number of times is less than or equal to a first preset number, and the screen-on duration is less than or equal to the first preset duration, the recorded number of times charging is performed in the preset charging state is updated.

[0022] Optionally, the method further comprises:

[0023] In response to the charging duration being at least partially outside the preset time period, clearing the recorded number of times charging is performed in the preset charging state;

[0024] and / or,

[0025] When the screen-on number of times is greater than a first preset number of times, or the screen-on duration is greater than a first preset duration, the recorded number of times charging is performed in the preset charging state is cleared.

[0026] Optionally, when the number of times the electronic device is charged in the preset charging state is greater than or equal to a preset value, controlling the electronic device to charge in the first charging mode includes:

[0027] When the number of times the electronic device is charged in the preset charging state is greater than or equal to a preset value, determining whether the electronic device is in a locked screen state;

[0028] In response to the electronic device being in a locked screen state, determining that a charging condition for charging in the first charging mode is met.

[0029] Optionally, the charging parameter includes at least one of a charging current, a charging voltage and a charging power.

[0030] According to a second aspect of an embodiment of the present application, a charging device is provided, the device comprising:

[0031] A screen lighting module, used to light up the screen of the electronic device during charging;

[0032] The first switching module is used to switch the charging mode of the electronic device to adjust the charging parameters of the electronic device according to the screen-on information of the electronic device and the current charging mode of the electronic device.

[0033] Optionally, the first switching module includes:

[0034] A first determining unit, configured to determine whether a charging mode switching condition is met according to screen-on information of the electronic device;

[0035] The second determining unit is used to determine whether to switch the charging mode of the electronic device to a target mode according to whether the charging mode switching condition is met and the current charging mode, wherein different charging modes correspond to different charging parameters.

[0036] Optionally, the second determining unit is configured to perform at least one of the following:

[0037] When the charging mode switching condition is met and the current charging mode is the first charging mode, switching the charging mode of the electronic device to the second charging mode; wherein the charging parameter of the second charging mode is less than the charging parameter of the first charging mode;

[0038] When the charging mode switching condition is not met and the current charging mode is the first charging mode, the charging mode of the electronic device is switched to a third charging mode, wherein a charging parameter of the third charging mode is greater than a charging parameter of the first charging mode and less than a charging parameter of the second charging mode.

[0039] Optionally, the device further comprises:

[0040] The second switching module is used to switch the charging mode of the electronic device to the second charging mode when the charging mode switching condition is met and the current charging mode is the third charging mode.

[0041] Optionally, the device further comprises:

[0042] a determination module, configured to determine whether a charging start time is within a preset time period in response to the charging protection mode being turned on;

[0043] A first acquisition module, configured to, if it is determined that the charging start time is within a preset time period, acquire the number of times the electronic device is charged in a preset charging state in a historical period, wherein the preset charging state is used to indicate that the number of times the screen of the electronic device is turned on during one charging process is less than or equal to a first preset number, and the screen-on duration is less than or equal to the first preset duration;

[0044] The first control module is used to control the electronic device to charge in the first charging mode when the number of times the electronic device is charged in the preset charging state is greater than or equal to a preset value.

[0045] Optionally, the device further comprises:

[0046] A second acquisition module is used to acquire the charging duration of the electronic device during a charging process, as well as the number of times and duration of screen lighting during the charging duration;

[0047] An updating module is used to update the recorded number of times charging is performed in the preset charging state in response to the charging duration being within the preset time period, when the number of screen-on times is less than or equal to a first preset number, and the screen-on duration is less than or equal to the first preset duration.

[0048] Optionally, the device further comprises:

[0049] A first clearing module, configured to clear the recorded number of times of charging in the preset charging state in response to the charging duration being at least partially outside the preset time period;

[0050] and / or,

[0051] The second clearing module is used to clear the recorded number of times of charging in the preset charging state when the number of times the screen is on is greater than the first preset number, or the screen is on for a duration greater than the first preset duration.

[0052] Optionally, the first control module is used to:

[0053] When the number of times the electronic device is charged in the preset charging state is greater than or equal to a preset value, determining whether the electronic device is in a locked screen state;

[0054] In response to the electronic device being in a screen lock state, controlling the electronic device to charge in the first charging mode.

[0055] Optionally, the charging parameter includes at least one of a charging current, a charging voltage and a charging power.

[0056] According to a third aspect of the present application, an electronic device is provided, including:

[0057] a memory for storing processor-executable instructions;

[0058] A processor connected to the memory;

[0059] Wherein, the processor is used to execute the charging method as described above.

[0060] In a fourth aspect of an embodiment of the present application, a non-temporary computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of a computer, the computer is enabled to perform the charging method described above.

[0061] The technical solution provided by the embodiments of the present application may have the following beneficial effects:

[0062] In the embodiment of the present application, since the screen-on information of the electronic device during the charging process can reflect the frequency of the user using the electronic device during the charging process of the electronic device, during the charging process of the electronic device, it can be determined whether the user has the need to use the electronic device according to the screen-on information of the electronic device. When it is determined that the user has the need to use the electronic device according to the screen-on information, the charging parameters can be adjusted by switching the charging mode to achieve a balance between the battery charging protection of the electronic device and the user's needs.

[0063] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0065] Figure 1 is a system architecture diagram of a charging method according to an exemplary embodiment;

[0066] Figure 2 is a flow chart of a charging method according to an exemplary embodiment;

[0067] Figure 3 is a charging current of a first charging mode according to an exemplary embodiment;

[0068] Figure 4 is a charging current of a second charging mode according to an exemplary embodiment;

[0069] Figure 5 is a charging current of a third charging mode according to an exemplary embodiment;

[0070] Figure 6 is a flow chart of a charging method according to another exemplary embodiment;

[0071] Figure 7 is a flow chart of a charging method according to another exemplary embodiment;

[0072] Figure 8 is a flow chart of a charging method according to another exemplary embodiment;

[0073] Fig. 9 is a schematic structural diagram of a charging device according to an exemplary embodiment;

[0074] Fig.10 The diagram is a schematic structural diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0075] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the appended claims.

[0076] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the embodiments of the present application. The singular forms of "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0077] It should be understood that, although the terms first, second, third, etc. may be used to describe various information in the embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the embodiments of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at..." or "when..." or "in response to determination".

[0078] refer to Figure 1 , Figure 1 A system architecture diagram for implementing the charging method provided in an embodiment of the present application is provided, wherein the system includes:

[0079] The UI (User Interface) module 101 is used to display the icon of the charging protection mode to the user so that the user can choose whether to turn on the charging protection mode, and to determine whether to turn on the charging protection mode based on the user's triggering operation on the icon. When it is determined that the charging protection mode is turned on, the icon is updated to indicate that the charging protection mode is turned on. If the charging protection mode is not turned on, the icon is displayed in the charging protection mode off state.

[0080] The detection module (Android service layer) 102 is connected to the UI module 101, and is used to set the parameter of the sleep_mode settings in this module to 1 when it is determined that the charging protection mode is turned on and the charging conditions for charging in the first charging mode are met; when it is determined that the charging protection mode is turned on and the charging conditions for charging in the first charging mode are not met, the parameter of the sleep_mode settings is set to 2; when it is determined that the charging protection mode is in the off state, the parameter of the sleep_mode settings is set to 0.

[0081] The transmission module (frameword layer) 103 is connected to the detection module 102 , and sets the parameters of the sleep_mode in the transmission module according to the values ​​of the sleep_mode settings in the detection module 102 .

[0082] For example, if sleep_mode settings is 1, set sleep_mode to 1; if sleep_modesettings is 2, set sleep_mode to 2; if sleep_mode settings is 0, set sleep_mode to 0.

[0083] The charging control module 104 is connected to the transmission module 103 , selects a corresponding ammeter according to the parameter value of sleep_mode in the transmission module 103 , and selects a current charging current from the ammeter based on the current temperature of the battery.

[0084] Exemplarily, when the parameter value of sleep_mode obtained by the charging control module 104 from the transmission module 103 is 1, and the current temperature of the battery is T1, the current value corresponding to the temperature T1 is obtained from the ammeter corresponding to the parameter value of sleep_mode of 1. Assuming that the obtained current value is A1, the current charging current of the battery is controlled to be A1.

[0085] When the parameter value of sleep_mode obtained by the charging control module 104 from the transmission module 103 is 2, and the current temperature of the battery is T1, the current value corresponding to the temperature T1 is obtained from the ammeter corresponding to the parameter value of sleep_mode 2. Assuming that the obtained current value is A2, the current charging current of the battery is controlled to be A2.

[0086] refer to Figure 2 , Figure 2 A schematic flow chart of a charging method is provided, which is performed by an electronic device. The charging method includes:

[0087] S201: During the charging process of the electronic device, the screen of the electronic device turns on;

[0088] S202: Switch the charging mode of the electronic device to adjust the charging parameters of the electronic device according to the screen-on information of the electronic device and the current charging mode of the electronic device.

[0089] The above-mentioned electronic device may be an electronic device that needs to be powered by a rechargeable battery.

[0090] Exemplarily, the above-mentioned electronic device may be terminal devices such as a mobile phone, a tablet computer, a laptop computer, a smart bracelet, a learning machine, and a smart wearable device.

[0091] For example, terminal devices using nickel-cadmium batteries, nickel-metal hydride batteries, lithium-ion batteries, lithium-polymer batteries and / or lead-acid batteries.

[0092] The above-mentioned screen-on information at least includes but is not limited to the number of times the electronic device's screen has been on since the start of charging to the current moment, the screen-on duration of each time, and the total screen-on duration.

[0093] Considering that in most cases, the screen lighting of an electronic device can reflect that the user is using the electronic device or is about to use the electronic device, therefore, based on the screen lighting information of the electronic device during the charging process, it can reflect the frequency of the user's use of the electronic device when the electronic device is charging, and then determine the user's requirements for the charging speed of the electronic device.

[0094] Based on this, when the screen of an electronic device is on, the frequency of use of the electronic device by the user during the charging process of the electronic device can be determined based on the screen-on information of the electronic device, and then it can be determined whether the charging speed corresponding to the current charging mode of the electronic device meets the user's needs. When it is determined based on the screen-on information that the charging speed corresponding to the current charging mode of the electronic device does not meet the user's needs, the charging parameters of the electronic device are adjusted by switching the current charging mode of the electronic device to achieve the purpose of adjusting the charging speed of the electronic device.

[0095] In some embodiments, the screen-on information may indicate the on / off status of the screen of the electronic device during the charging process.

[0096] In some embodiments, the screen-lit information may indicate at least one of the following:

[0097] The number of times the screen of an electronic device turns on during charging;

[0098] The duration of a single screen on an electronic device during charging;

[0099] The maximum screen-on duration of an electronic device during charging;

[0100] The total screen-on time of the electronic device during charging;

[0101] Whether the electronic device detects touch operations on the touch screen when the screen is turned on during charging.

[0102] Of course, the above is only an example of the screen-lit information, and the specific implementation is not limited to the above example.

[0103] Exemplarily, the above-mentioned charging parameters include charging power. If the charging power included in the charging mode of the electronic device at the current moment is relatively small, the charging speed is relatively slow. At this time, if it is determined based on the screen-on information of the electronic device that the electronic device has a large number of screen-on times or a long screen-on duration from the start time of charging to the current moment, it means that the user has a strong demand for using the electronic device. If a smaller charging power is still used for charging, the charging speed may not meet the user's needs.

[0104] Therefore, when it is detected that the screen of the electronic device is turned on a large number of times or the screen is on for a long time during the period from the start of charging to the current moment, the current charging mode of the electronic device can be switched to increase the charging power of the electronic device, thereby increasing the charging speed.

[0105] On the contrary, if the screen of the electronic device is not detected to be on during the charging process of the electronic device, or the screen is on less frequently and for a shorter time, it means that the user's demand for the electronic device is weak, or there is no current need to use the electronic device. The device can continue to be charged at the current smaller charging power to reduce damage to the battery of the electronic device caused by excessive charging power, thereby increasing the service life of the battery of the electronic device.

[0106] In an embodiment of the present application, since the screen-on information of the electronic device during the charging process can reflect the frequency with which the user uses the electronic device during the charging process of the electronic device, during the charging process of the electronic device, whether the user has the need to use the electronic device can be determined based on the screen-on information of the electronic device. When it is determined that the user has the need to use the electronic device based on the screen-on information, the charging parameters can be adjusted by switching the charging mode to achieve a balance between the electronic device battery charging protection and the user needs.

[0107] In one embodiment, according to the screen-on information of the electronic device and the current charging mode of the electronic device, switching the charging mode of the electronic device to adjust the charging parameters of the electronic device includes:

[0108] Determining whether a charging mode switching condition is met according to screen-on information of the electronic device;

[0109] According to whether the charging mode switching condition is met and the current charging mode, it is determined whether to switch the charging mode of the electronic device to a target mode, wherein different charging modes correspond to different charging parameters.

[0110] Exemplarily, the correspondence between the charging mode and the charging parameters may be pre-stored in the electronic device. During the charging process of the electronic device, the number of times the screen of the electronic device is on and / or the duration of the screen being on may be counted from the time the electronic device starts charging, and each time the screen of the electronic device is detected to be on, based on the number of times the screen of the electronic device is on and / or the duration of the screen being on during this charging process, it is determined whether the charging mode switching condition is met. If it is determined that the charging mode switching condition of the electronic device is met, the current charging mode of the electronic device is switched to the target mode, so as to adjust the charging parameters of the electronic device to the charging parameters corresponding to the target mode. If the charging mode switching condition of the electronic device is not met, the current charging mode is continued to be maintained for charging, and when the screen of the electronic device is detected to be on next time, it is determined whether the charging mode switching condition is met based on the number of times the screen of the electronic device is on and / or the duration of the screen being on during this charging process.

[0111] Exemplarily, a correspondence between the number of screen-on information times and the charging mode is pre-stored in the electronic device. Based on this, when the electronic device starts charging, the number of screen-on times of the electronic device is counted. When the number of screen-on times of the electronic device is greater than the number of screen-on times corresponding to the current charging mode, it is determined that the charging mode switching condition is met, and the charging mode of the electronic device is switched to a target mode corresponding to the currently recorded number of screen-on times, so as to adjust the charging parameters of the electronic device to the charging parameters corresponding to the target mode.

[0112] Exemplarily, the correspondence between the screen-on time and the charging mode is pre-stored in the electronic device, so that the screen-on time of the electronic device can be timed each time the screen is turned on. When the charging mode corresponding to the screen-on time of the electronic device is not the current charging mode, it indicates that the charging mode switching condition is met, and the charging mode of the electronic device is switched to the target mode corresponding to the currently recorded screen-on time, so as to adjust the charging parameters of the electronic device to the charging parameters corresponding to the target mode.

[0113] It should be noted that the above-mentioned screen-on time can be the total screen-on time from the start of charging of the electronic device to the current moment, or it can be the maximum screen-on time.

[0114] For example, during the charging process of an electronic device, if it is detected that the screen of the electronic device is turned on, the number of times the screen of the electronic device is turned on during this charging process and / or the duration of each screen turn on are obtained. If the number of times the screen of the electronic device is turned on is greater than a second preset number, and / or the single maximum screen-on duration is greater than the second preset duration, it is determined that the electronic device meets the charging mode switching conditions. At this time, the current charging mode of the electronic device is switched to the target mode.

[0115] If the number of times the screen of the electronic device is turned on during the current charging process is less than or equal to the second preset number, and the maximum single screen-on duration is less than or equal to the second preset duration, the current charging mode of the electronic device is maintained to continue charging.

[0116] Among them, the above-mentioned second preset number of times and second preset duration can be set as needed, and the embodiment of the present application does not limit this.

[0117] Exemplarily, the second preset number of times is any number between 0-5 times, for example, 2 times.

[0118] For example, when the second preset number is 2, when it is detected that the current screen of the electronic device is lit for the third time from the start of charging to the current moment, it means that the charging mode switching condition is met, and the current charging mode of the electronic device is switched to the target mode. If it is determined that the current screen of the electronic device is lit for the first time, it means that the charging mode switching condition is not met, and the current charging mode of the current device is maintained to continue charging.

[0119] Exemplarily, the second preset duration may be any value between 0-20 minutes, for example, 10 minutes.

[0120] For example, assuming that the second preset duration is 10 minutes, when the electronic device is detected to be on, if it is determined based on the previous screen-on information of the electronic device that the total screen-on duration of the electronic device has exceeded 10 minutes, it means that the charging mode switching condition is met, and the current charging mode of the electronic device is switched to the target mode. If it is determined that the total screen-on duration of the electronic device from the start of charging to the current time is 6 minutes, it means that the charging mode switching condition is not met, and the current charging mode of the current device is maintained to continue charging.

[0121] For example, assuming that the second preset time is 10 minutes, when it is detected that the electronic device is on the screen, the timer can be used to count the current screen-on time of the electronic device. If the current screen-on time of the electronic device is greater than or equal to the second preset time, it is determined that the charging mode switching condition is met, and the current charging mode of the electronic device is switched to the target mode.

[0122] It should be noted that the current charging mode of the electronic device can be switched to the target mode when any one of the number of screen-on times and the screen-on duration meets the charging mode switching condition, or the current charging mode of the electronic device can be switched to the target mode when both the number of screen-on times and the screen-on duration meet the charging mode switching condition. The embodiments of the present application are not limited to this.

[0123] In an embodiment of the present application, since the number of times the screen is turned on and the duration of the screen being on can reflect the frequency with which a user uses an electronic device and the duration of each use, determining whether to switch the charging mode of the electronic device to the target mode based on the number of times the screen is turned on and the duration of the screen being on during the charging process can improve the accuracy of the judgment.

[0124] In one embodiment, determining whether to switch the charging mode of the electronic device to the target mode according to whether the charging mode switching condition and the current charging mode are satisfied includes at least one of the following:

[0125] When the charging mode switching condition is met and the current charging mode is the first charging mode, switching the charging mode of the electronic device to the second charging mode; wherein the charging parameter of the second charging mode is less than the charging parameter of the first charging mode;

[0126] When the charging mode switching condition is not met and the current charging mode is the first charging mode, the charging mode of the electronic device is switched to a third charging mode, wherein a charging parameter of the third charging mode is greater than a charging parameter of the first charging mode and less than a charging parameter of the second charging mode.

[0127] Exemplarily, the above-mentioned charging parameters include but are not limited to charging power, that is, the charging power of the first charging mode is greater than the charging power of the first charging mode, and less than the charging power of the second charging mode.

[0128] As another example, the above charging parameters may also include but are not limited to: charging current and / or charging voltage.

[0129] The above-mentioned first charging mode may be a slow charging mode with a smaller charging power, the above-mentioned second charging mode may be a fast charging mode with a larger charging power, and the above-mentioned third charging mode may be a charging mode with a charging power between the first charging mode and the second charging mode.

[0130] For example, the charging power of the first charging mode is 66 W, the charging power of the second charging mode is 120 W, and the charging power of the third charging mode can be any value between the charging power of the first charging mode and the charging power of the second charging mode.

[0131] The above-mentioned first charging mode can be a slow charging mode with a smaller charging current and / or charging voltage, the above-mentioned second charging mode can be a fast charging mode with a larger charging current and / or charging voltage, and the above-mentioned third charging mode can be a charging mode with a charging current and a charging voltage between the first charging mode and the second charging mode.

[0132] refer to Figures 3 to 5 , Figures 3 to 5 A schematic diagram of charging current for charging an electronic device in a first charging mode, a second charging mode, and a third charging mode provided in an embodiment of the present application.

[0133] It should be noted that Figures 3 to 5 The charging current of an electronic device in the first charging mode, the second charging mode, and the third charging mode is listed only for exemplary purposes and does not constitute a limitation on the charging current of the first charging mode, the second charging mode, and the third charging mode of the embodiments of the present application.

[0134] Since the rechargeable batteries used in electronic devices are chemical batteries, when large charging current and charging voltage are used, the chemical reaction occurs, causing the battery to generate a lot of heat during the charging process, which will cause irreversible damage to the battery and affect the battery life. However, when the battery charging current and charging voltage are small, the charging speed will be slower. If the user has a strong demand for the use of electronic devices, the slower charging speed will affect the user's use of electronic devices.

[0135] Based on this, when the electronic device meets the charging conditions of the first charging mode, the electronic device can be charged in the first charging mode with a smaller charging current and charging voltage. If during the charging process, it is determined based on the screen-on information of the electronic device that the user is still frequently using the electronic device during the charging process, it means that the user has a strong demand for the use of the electronic device. At this time, it can be determined that the charging mode switching conditions are met, and the charging mode of the electronic device is switched to the second charging mode to increase the charging speed of the electronic device to meet the user's demand for the use of the electronic device.

[0136] Based on the screen light information of the electronic device, it is determined that during the charging process of the electronic device, although the user has used the electronic device, the usage frequency is relatively small and the usage time is relatively short, indicating that the user currently has a need to use the electronic device, but the need is not strong. The charging mode of the electronic device can be switched from the first charging mode to the third charging mode, and the electronic device is first charged with a charging current greater than the charging current of the first charging mode, thereby slightly speeding up the charging speed of the electronic device.

[0137] In one embodiment, the method further comprises:

[0138] When the charging mode switching condition is met and the current charging mode is the third charging mode, the charging mode of the electronic device is switched to the second charging mode.

[0139] Exemplarily, if the electronic device is detected to have its screen on during charging in the third charging mode, and based on the screen-on information of the electronic device collected at the current moment, it is determined that the charging mode switching conditions are met, the charging mode of the electronic device is switched from the third charging mode to the second charging mode, thereby further improving the charging speed of the electronic device.

[0140] refer to Figure 6 In one embodiment, the method further comprises:

[0141] S601: In response to the charging protection mode being turned on, determining whether a charging condition for charging in the first charging mode is met;

[0142] S602: If a charging condition for charging in the first charging mode is met, control the electronic device to charge in the first charging mode.

[0143] Exemplarily, in the electronic device of the embodiment of the present application, an option of whether to turn on the charging protection mode is also provided. When the electronic device starts to charge, it is determined whether the charging protection mode is turned on. If it is detected that the charging protection mode is turned on, it is determined whether the charging conditions for charging in the first charging mode are met at the current moment. If it is determined that the charging conditions for charging in the first charging mode are met, the electronic device is controlled to charge in the first charging mode.

[0144] If it is detected that the charging protection mode is not turned on, charging is performed in the second charging mode. Alternatively, if it is detected that the charging protection mode is turned on but the charging conditions are not sufficient for charging in the first charging mode, charging is performed in the second charging mode or the third charging mode.

[0145] The above charging conditions include at least one of the following:

[0146] When the electronic device starts to charge, the electronic device is in a locked screen state;

[0147] The charging start time of the electronic device is within the preset time period;

[0148] During a historical period, the number of times the electronic device is charged in a preset charging state is greater than or equal to a preset value, wherein the preset charging state is used to indicate that the number of times the screen of the electronic device is turned on during a charging process is less than or equal to a first preset number of times, and the screen-on duration is less than or equal to the first preset duration.

[0149] In one embodiment, the method further comprises:

[0150] In response to the charging protection mode being turned on, determining whether the charging start time is within a preset time period;

[0151] If it is determined that the charging start time is within a preset time period, obtaining the number of times the electronic device is charged in a preset charging state during the historical period, wherein the preset charging state is used to indicate that the number of times the screen of the electronic device is turned on during one charging process is less than or equal to a first preset number of times, and the screen-on duration is less than or equal to the first preset duration;

[0152] When the number of times the electronic device is charged in the preset charging state is greater than or equal to a preset value, the electronic device is controlled to charge in the first charging mode.

[0153] For example, the preset time period may be a time period when the user's demand for electronic device use is relatively weak, and the preset time period may also be set by the user. For example, the preset time period may be between 10 pm and 10 am, or any interval between 10 pm and 10 am.

[0154] Since most people rest between 10 pm and 10 am, and considering that users have a weaker demand for using electronic devices during this time period, if it is detected that a user charges an electronic device during this time period, the number of times the electronic device has been charged in a preset charging state during the historical period can be further obtained.

[0155] If the number of times the electronic device is charged in the preset charging state in the historical period is greater than or equal to the preset value, it means that during the multiple charging processes in the historical period, the user rarely uses the electronic device each time the electronic device is charged, that is, during the multiple charging processes in the historical period, the user's demand for using the electronic device is relatively weak. At this time, the electronic device can be controlled to charge in the first charging mode.

[0156] If the number of times the electronic device is charged in a preset charging state in a historical period is less than a preset value, it means that the user has frequently used the electronic device during multiple charging processes in the historical period. At this time, if the electronic device is charged in the first charging mode, it may not meet the user's use needs for the electronic device. In other words, it means that the electronic device does not meet the charging conditions sufficient for charging in the first charging mode. At this time, the electronic device can be controlled to charge in the second charging mode or the third charging mode.

[0157] In addition, if it is detected that the start time of charging the electronic device by the user is outside the preset time period, considering that the user's demand for using the electronic device is usually stronger outside the preset time period, at this time, charging the electronic device with the first charging mode will affect the user's use of the electronic device. At this time, the electronic device can be controlled to charge in the second charging mode or the third charging mode.

[0158] Among them, the above-mentioned first preset number of times, first preset duration and preset value can also be set as needed, and the embodiment of the present application does not limit this.

[0159] Exemplarily, the first preset number of times may be any number from 1 to 10 times, for example, 5 times. The first preset duration may be any duration from 1 to 10 minutes, for example, 5 minutes, and the preset value may be any value from 3 to 7, for example, 5.

[0160] In one embodiment, when the number of times the electronic device is charged in the preset charging state is greater than or equal to a preset value, controlling the electronic device to charge in the first charging mode includes:

[0161] When the number of times the electronic device is charged in the preset charging state is greater than or equal to a preset value, determining whether the electronic device is in a locked screen state;

[0162] In response to the electronic device being in a screen lock state, controlling the electronic device to charge in the first charging mode.

[0163] For example, considering that user habits are not static and there may be exceptions, when it is determined that the charging duration of the electronic device is within a preset time period and the number of times the electronic device is charged in a preset charging state is greater than or equal to a preset value, it is also necessary to detect whether the electronic device is in a locked screen state. If the electronic device is in a locked screen state, it means that the user is not using the electronic device. At this time, the electronic device is controlled to charge in the first charging mode.

[0164] If the electronic device is in unlocked state, it means that the user is using the electronic device. If the first charging mode is used for charging, the charging speed may not meet the user's needs because the charging parameters of the first charging mode are too small. At this time, the second charging mode or the third charging mode can be used for charging.

[0165] In one embodiment, the method further comprises:

[0166] Obtaining a charging duration of the electronic device during a charging process, as well as the number of times and duration of screen lighting during the charging duration;

[0167] In response to the charging duration being within the preset time period, when the screen-on number of times is less than or equal to a first preset number, and the screen-on duration is less than or equal to the first preset duration, the recorded number of times charging is performed in the preset charging state is updated.

[0168] For example, during a charging process of an electronic device, the charging start time and charging end time of the electronic device can be obtained, and based on the charging start time and charging end time, it is determined whether the entire charging duration of the electronic device is within a preset time period. If the entire charging duration of the electronic device is within the preset time period, and the number of times the screen of the electronic device is on during the preset time period is less than or equal to the first preset number, and the screen-on duration of the electronic device is less than or equal to the first preset duration, it is determined that the electronic device is charged in a preset charging state during this charging process, and 1 can be added to the current cumulative number of times the electronic device is charged in the preset charging state.

[0169] For example, the preset time period is between 10 pm and 10 am, and the first preset number of times is 5 times, and the first preset duration is 5 minutes. If during a charging process, the charging start time of the electronic device is 11 pm, the charging end time is 6 am, and the number of times the screen of the electronic device is on during the entire charging duration is less than or equal to 5 times, and the duration of each screen on time is less than or equal to five minutes, then the number of times the electronic device is charged in the preset charging state is accumulated plus 1.

[0170] In one embodiment, the method further comprises:

[0171] In response to the charging duration being at least partially outside the preset time period, clearing the recorded number of times charging is performed in the preset charging state;

[0172] and / or,

[0173] When the screen-on number of times is greater than a first preset number of times, or the screen-on duration is greater than a first preset duration, the recorded number of times charging is performed in the preset charging state is cleared.

[0174] Exemplarily, if during the duration of a charge, the charging start time or the charging end time is outside the preset time period, it means that during the duration of a charge of the electronic device, at least part of the charging time is outside the preset time period, and the number of times the electronic device is charged in the preset charging state recorded in the electronic device is cleared.

[0175] For example, assuming that the preset time period is between 10 pm and 10 am, if the charging start time is 9 pm, or the charging end time is 10:30 am, it is determined that the continuous charging time of the electronic device is at least partially outside the preset time period, and the number of times the electronic device is charged in the preset charging state recorded in the electronic device is cleared.

[0176] Exemplarily, if the entire continuous charging time of the electronic device is determined to be within a preset time period based on the start time or end time of charging of the electronic device, but during the entire charging duration of the electronic device, the screen of the electronic device is turned on for a number of times greater than a first preset number, and / or the single screen-on duration of the electronic device is greater than the first preset duration, the number of times the electronic device is charged in the preset charging state currently recorded in the electronic device is cleared.

[0177] For example, assuming that the preset time period is between 10 pm and 10 am, and the first preset number of times is 5 times, and the first preset duration is 5 minutes. If during a charging process, the charging start time of the electronic device is 11 pm, the charging end time is 6 am, and the screen of the electronic device is turned on more than 5 times during the entire charging duration, or at least one time the screen is turned on for more than five minutes, the number of charging times currently recorded in the electronic device in the preset charging state is also cleared.

[0178] In one embodiment, when the number of times the electronic device is charged in the preset charging state is greater than or equal to a preset value, controlling the electronic device to charge in the first charging mode further includes:

[0179] If the number of times the electronic device is charged in the preset charging state is greater than or equal to a preset value, displaying a prompt message, wherein the prompt message is used to prompt whether to charge in the first charging mode;

[0180] In response to the detected positive operation, the electronic device is controlled to charge in the first charging mode.

[0181] Exemplarily, when it is determined that the number of times the electronic device is charged in the preset charging state is greater than or equal to the preset value, a prompt message may be displayed on the electronic device, wherein the prompt message is used to prompt the user whether to charge in the first charging mode, and if a positive operation of the user is detected, the electronic device is controlled to charge in the first charging mode. If a negative operation of the user is detected, the electronic device is charged in the second charging mode.

[0182] In an embodiment of the present application, when it is detected that the number of times the electronic device is charged in the preset charging state is greater than or equal to a preset value, it indicates that the electronic device meets the charging conditions for charging in the first charging mode. At this time, a prompt message can be displayed on the electronic device to allow the user to choose whether to charge in the first charging mode. This can reduce the probability that the charging speed cannot meet user needs due to misjudgment of the electronic device, thereby further improving the user experience.

[0183] It should be noted that the number of screen-on times in the embodiment of the present application includes the following two counting methods:

[0184] In one embodiment, when it is detected that the screen of the electronic device is turned on, it is counted once, and it is not determined whether the electronic device is unlocked during the screen-on process.

[0185] In another embodiment, when the screen of the electronic device is turned on and unlocked, the number of times the screen of the electronic device is turned on is counted once. That is, if the electronic device only turns on the screen but is not unlocked, the number of times the screen is turned on is not counted.

[0186] In addition, charging the electronic device mentioned in the embodiments of the present application refers to charging the battery in the electronic device.

[0187] refer to Figure 7 and Figure 8 , the embodiment of the present application also provides a charging method, including:

[0188] refer to Figure 7 If the charging protection mode is on, the phone starts charging after 10 pm and ends charging after 5 am and before 10 am, and the user does not unlock the screen during the entire charging period, or the total number of times the user unlocks the screen during the entire charging period is less than or equal to 5 times, and the duration of each unlocking of the screen is less than or equal to 5 minutes. After this situation lasts for 5 times, the phone is charged in the first charging mode.

[0189] On the contrary, if it is detected that the charging protection mode is in the off state, or if an unlocking operation of the screen is detected during charging in the first charging mode, the first charging mode is immediately exited and switched to the second charging mode.

[0190] By adopting the charging method in the embodiment of the present application, when the user has a regular schedule and does not need to use the mobile phone urgently at night, the mobile phone can be charged in the first charging mode, thereby reducing the loss of the mobile phone battery life due to fast charging and extending the battery life; at the same time, when the user needs to use the mobile phone urgently, the first charging mode can be switched to the second charging mode, thus killing two birds with one stone.

[0191] refer to Figure 8 , the present application embodiment provides another charging method, including:

[0192] After turning on the phone, the user can manually operate by clicking "Settings -> Power saving and battery -> Battery -> Charging protection mode", and the user can determine whether to turn on the charging protection mode.

[0193] If it is detected that the user has not turned on the charging protection mode, set the sleep_mode settings to 0;

[0194] If it is detected that the user chooses to turn on the charging protection mode, determine whether the phone has been charged 5 times or more in the preset charging state in the historical period. If so, set sleep_mode settings to 1; if the number of times the phone has been charged in the preset charging state in the historical period is less than 5 times, set sleep_mode settings to 2.

[0195] Among them, the preset charging status means that the mobile phone starts charging after 10 pm and ends charging after 5 am, and before 10 am, no user unlocking the screen is detected during the entire charging duration, or the total number of times the user unlocks the screen during the entire charging duration is less than or equal to 5 times, and the duration of each screen unlocking is less than or equal to 5 minutes.

[0196] The framework layer reads the parameter values ​​set by the Android service layer for sleep_mode settings, and writes parameters to the node sleep_mode according to the corresponding parameter values.

[0197] The kernel layer reads the parameter value of the sleep_mode node from the framework layer, and selects the current meter corresponding to the thermal_level (battery temperature) according to the parameter value of the sleep_mode node. When the phone is plugged into the charger, it will make dynamic judgments throughout the process. If the parameter value of the sleep_mode node is 1, the current meter corresponding to the thermal_level of sleep_mode 1 is selected. If the sleep_mode node is 2, the current meter corresponding to the thermal_level of sleep_2 is selected. If the parameter value of the sleep_mode node is 0, the current meter corresponding to the thermal_level of sleep_mode 0 is selected. This judgment is made once for each charging cycle, and the current of the sleep_mode 2 table is larger than that of the sleep_mode 1 table, and smaller than that of the sleep_mode 0 table.

[0198] If the user detects a screen unlock operation while the phone is charging in the first charging mode, the first charging mode will be switched to the third charging mode to speed up charging; when the phone detects the second screen unlock operation, the third charging mode will be switched to the second charging mode to shorten the charging time and meet user needs.

[0199] refer to Fig. 9 , the embodiment of the present application further provides a charging device, the device comprising:

[0200] A screen lighting module 901, configured to light up the screen of the electronic device during the charging process of the electronic device;

[0201] The first switching module 902 is used to switch the charging mode of the electronic device to adjust the charging parameters of the electronic device according to the screen-on information of the electronic device and the current charging mode of the electronic device.

[0202] Optionally, the first switching module 902 includes:

[0203] A first determining unit, configured to determine whether a charging mode switching condition is met according to screen-on information of the electronic device;

[0204] The second determining unit is used to determine whether to switch the charging mode of the electronic device to a target mode according to whether the charging mode switching condition is met and the current charging mode, wherein different charging modes correspond to different charging parameters.

[0205] Optionally, the second determining unit is configured to perform at least one of the following:

[0206] When the charging mode switching condition is met and the current charging mode is the first charging mode, switching the charging mode of the electronic device to the second charging mode; wherein the charging parameter of the second charging mode is less than the charging parameter of the first charging mode;

[0207] When the charging mode switching condition is not met and the current charging mode is the first charging mode, the charging mode of the electronic device is switched to a third charging mode, wherein a charging parameter of the third charging mode is greater than a charging parameter of the first charging mode and less than a charging parameter of the second charging mode.

[0208] Optionally, the device further comprises:

[0209] The second switching module is used to switch the charging mode of the electronic device to the second charging mode when the charging mode switching condition is met and the current charging mode is the third charging mode.

[0210] Optionally, the device further comprises:

[0211] a determination module, configured to determine whether a charging start time is within a preset time period in response to the charging protection mode being turned on;

[0212] A first acquisition module, configured to, if it is determined that the charging start time is within a preset time period, acquire the number of times the electronic device is charged in a preset charging state in a historical period, wherein the preset charging state is used to indicate that the number of times the screen of the electronic device is turned on during one charging process is less than or equal to a first preset number, and the screen-on duration is less than or equal to the first preset duration;

[0213] The first control module is used to control the electronic device to charge in the first charging mode when the number of times the electronic device is charged in the preset charging state is greater than or equal to a preset value.

[0214] Optionally, the device further comprises:

[0215] A second acquisition module is used to acquire the charging duration of the electronic device during a charging process, as well as the number of times and duration of screen lighting during the charging duration;

[0216] An updating module is used to update the recorded number of times charging is performed in the preset charging state in response to the charging duration being within the preset time period, when the number of screen-on times is less than or equal to a first preset number, and the screen-on duration is less than or equal to the first preset duration.

[0217] Optionally, the device further comprises:

[0218] A first clearing module, configured to clear the recorded number of times of charging in the preset charging state in response to the charging duration being at least partially outside the preset time period;

[0219] and / or,

[0220] The second clearing module is used to clear the recorded number of times of charging in the preset charging state when the number of times the screen is on is greater than the first preset number, or the screen is on for a duration greater than the first preset duration.

[0221] Optionally, the first control module is used to:

[0222] When the number of times the electronic device is charged in the preset charging state is greater than or equal to a preset value, determining whether the electronic device is in a locked screen state;

[0223] In response to the electronic device being in a screen lock state, a charging condition for the electronic device to be charged in the first charging mode is controlled.

[0224] Optionally, the first control module is further used for:

[0225] When the number of times the electronic device is charged in the preset charging state is greater than or equal to a preset value, displaying a prompt message, wherein the prompt message is used to prompt whether to charge in the first charging mode;

[0226] In response to the detected positive operation, the electronic device is controlled to charge in the first charging mode.

[0227] Optionally, the device further comprises:

[0228] a second control module, configured to control the electronic device to charge in the second charging mode or the third charging mode in response to the charging protection mode being turned on and the number of times the electronic device is charged in the preset charging state is less than a preset value;

[0229] a third control module, configured to control the electronic device to charge in the second charging mode in response to the charging start time being outside the preset time period;

[0230] a fourth control module, configured to control the electronic device to charge in the second charging mode in response to the detected negative operation;

[0231] A fifth control module is used to control the electronic device to charge in the second charging mode in response to the charging protection mode being turned off.

[0232] Optionally, the charging parameter includes at least one of a charging current, a charging voltage and a charging power.

[0233] refer to Fig.10 In an embodiment of the present application, an electronic device 1000 is provided, including:

[0234] Memory 1004 for storing processor executable instructions;

[0235] A processor 1020 connected to the memory 1004;

[0236] The processor 1020 is configured to execute the charging method provided by any of the aforementioned technical solutions.

[0237] A block diagram of an electronic device 1000 is shown according to an exemplary embodiment. For example, the electronic device 1000 may be a mobile phone, a tablet computer, a notebook computer, a portable learning machine, and the like.

[0238] refer to Fig.10 , the electronic device 1000 may include one or more of the following components: a processing component 1002 , a memory 1004 , a power component 1006 , a multimedia component 1008 , an audio component 1010 , an input / output (I / O) interface 1012 , a sensor component 1014 , and a communication component 1018 .

[0239] The processing component 1002 generally controls the overall operation of the electronic device 1000, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1002 may include one or more processors 1020 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 1002 may include one or more modules to facilitate the interaction between the processing component 1002 and other components. For example, the processing component 1002 may include a multimedia module to facilitate the interaction between the multimedia component 1008 and the processing component 1002.

[0240] The memory 1004 is configured to store various types of data to support operations on the electronic device 1000. Examples of such data include instructions for any application or method operating on the electronic device 1000, contact data, phone book data, messages, pictures, videos, etc. The memory 1004 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0241] The power supply component 1006 provides power to various components of the electronic device 1000. The power supply component 1006 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 1000.

[0242] The multimedia component 1008 includes a screen that provides an output interface between the electronic device 1000 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1008 includes a front camera and / or a rear camera. When the electronic device 1000 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0243] The audio component 1010 is configured to output and / or input audio signals. For example, the audio component 1010 includes a microphone (MIC), and when the electronic device 1000 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1004 or sent via the communication component 1018. In some embodiments, the audio component 1010 also includes a speaker for outputting audio signals.

[0244] I / O interface 1012 provides an interface between processing component 1002 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0245] The sensor assembly 1014 includes one or more sensors for providing various aspects of status assessment for the electronic device 1000. For example, the sensor assembly 1014 can detect the open / closed state of the electronic device 1000, the relative positioning of components, such as the display and keypad of the electronic device 1000, and the sensor assembly 1014 can also detect the position change of the electronic device 1000 or a component of the electronic device 1000, the presence or absence of user contact with the electronic device 1000, the orientation or acceleration / deceleration of the electronic device 1000, and the temperature change of the electronic device 1000. The sensor assembly 1014 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 1014 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1014 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0246] The communication component 1018 is configured to facilitate wired or wireless communication between the electronic device 1000 and other devices. The electronic device 1000 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1018 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1018 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0247] In an exemplary embodiment, the electronic device 1000 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0248] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1004 including instructions, and the instructions can be executed by the processor 1020 of the electronic device 1000 to complete the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0249] An embodiment of the present application provides a non-temporary computer-readable storage medium. When the instructions in the storage medium are executed by a processor of a computer, the computer can execute the charging method described in one or more of the aforementioned technical solutions.

[0250] When the processor executes the instruction, it can at least perform the following steps:

[0251] During the charging process of the electronic device, the screen of the electronic device turns on;

[0252] According to the screen-on information of the electronic device and the current charging mode of the electronic device, the charging mode of the electronic device is switched to adjust the charging parameters of the electronic device.

[0253] Optionally, switching the charging mode of the electronic device to adjust the charging parameters of the electronic device according to the screen-on information of the electronic device and the current charging mode of the electronic device includes:

[0254] Determining whether a charging mode switching condition is met according to screen-on information of the electronic device;

[0255] According to whether the charging mode switching condition is met and the current charging mode, it is determined whether to switch the charging mode of the electronic device to a target mode, wherein different charging modes correspond to different charging parameters.

[0256] Optionally, determining whether to switch the charging mode of the electronic device to a target mode according to whether the charging mode switching condition and the current charging mode are satisfied includes at least one of the following:

[0257] When the charging mode switching condition is met and the current charging mode is the first charging mode, switching the charging mode of the electronic device to the second charging mode; wherein the charging parameter of the second charging mode is less than the charging parameter of the first charging mode;

[0258] When the charging mode switching condition is not met and the current charging mode is the first charging mode, the charging mode of the electronic device is switched to a third charging mode, wherein a charging parameter of the third charging mode is greater than a charging parameter of the first charging mode and less than a charging parameter of the second charging mode.

[0259] Optionally, the method further comprises:

[0260] When the charging mode switching condition is met and the current charging mode is the third charging mode, the charging mode of the electronic device is switched to the second charging mode.

[0261] Optionally, the method further comprises:

[0262] In response to the charging protection mode being turned on, determining whether a charging condition for charging in the first charging mode is met;

[0263] If a charging condition for charging in the first charging mode is met, the electronic device is controlled to charge in the first charging mode.

[0264] Optionally, in response to the charging protection mode being turned on, determining whether a charging condition for charging in the first charging mode is met includes:

[0265] In response to the charging protection mode being turned on, determining whether the charging start time is within a preset time period;

[0266] If it is determined that the charging start time is within a preset time period, obtaining the number of times the electronic device is charged in a preset charging state during the historical period, wherein the preset charging state is used to indicate that the number of times the screen of the electronic device is turned on during one charging process is less than or equal to a first preset number of times, and the screen-on duration is less than or equal to the first preset duration;

[0267] When the number of times the electronic device is charged in the preset charging state is greater than or equal to a preset value, the electronic device is controlled to charge in the first charging mode.

[0268] Optionally, the method further comprises:

[0269] Obtaining a charging duration of the electronic device during a charging process, as well as the number of times and duration of screen lighting during the charging duration;

[0270] In response to the charging duration being within the preset time period, when the screen-on number of times is less than or equal to a first preset number, and the screen-on duration is less than or equal to the first preset duration, the recorded number of times charging is performed in the preset charging state is updated.

[0271] Optionally, the method further comprises:

[0272] In response to the charging duration being at least partially outside the preset time period, clearing the recorded number of times charging is performed in the preset charging state;

[0273] and / or,

[0274] When the screen-on number of times is greater than a first preset number of times, or the screen-on duration is greater than a first preset duration, the recorded number of times charging is performed in the preset charging state is cleared.

[0275] Optionally, when the number of times the electronic device is charged in the preset charging state is greater than or equal to a preset value, controlling the electronic device to charge in the first charging mode includes:

[0276] When the number of times the electronic device is charged in the preset charging state is greater than or equal to a preset value, determining whether the electronic device is in a locked screen state;

[0277] In response to the electronic device being in a locked screen state, determining that a charging condition for charging in the first charging mode is met.

[0278] Optionally, when the number of times the electronic device is charged in the preset charging state is greater than or equal to a preset value, controlling the electronic device to charge in the first charging mode further includes:

[0279] When the number of times the electronic device is charged in the preset charging state is greater than or equal to a preset value, displaying a prompt message, wherein the prompt message is used to prompt whether to charge in the first charging mode;

[0280] In response to the detected positive operation, the electronic device is controlled to charge in the first charging mode.

[0281] Optionally, the method further comprises:

[0282] In response to the charging protection mode being turned on and the number of times the electronic device is charged in the preset charging state is less than a preset value, controlling the electronic device to be charged in the second charging mode or the third charging mode;

[0283] In response to the charging start time being outside the preset time period, controlling the electronic device to charge in the second charging mode;

[0284] In response to the detected negative operation, controlling the electronic device to charge in the second charging mode;

[0285] In response to the charging protection mode not being turned on, controlling the electronic device to charge in the second charging mode.

[0286] Optionally, the charging parameter includes at least one of a charging current, a charging voltage and a charging power.

[0287] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the claims.

[0288] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A charging method, characterized in that: Executed by an electronic device, the method includes: During the charging process of the electronic device, the screen of the electronic device turns on; According to the screen-on information of the electronic device and the current charging mode of the electronic device, the charging mode of the electronic device is switched to adjust the charging parameters of the electronic device.

2. The method according to claim 1, characterized in that The switching of the charging mode of the electronic device to adjust the charging parameters of the electronic device according to the screen-on information of the electronic device and the current charging mode of the electronic device includes: Determining whether a charging mode switching condition is met according to screen-on information of the electronic device; According to whether the charging mode switching condition is met and the current charging mode, it is determined whether to switch the charging mode of the electronic device to a target mode, wherein different charging modes correspond to different charging parameters.

3. The method according to claim 2, characterized in that The determining whether to switch the charging mode of the electronic device to the target mode according to whether the charging mode switching condition and the current charging mode are satisfied includes at least one of the following: When the charging mode switching condition is met and the current charging mode is the first charging mode, switching the charging mode of the electronic device to the second charging mode; wherein the charging parameter of the second charging mode is less than the charging parameter of the first charging mode; When the charging mode switching condition is not met and the current charging mode is the first charging mode, the charging mode of the electronic device is switched to a third charging mode, wherein a charging parameter of the third charging mode is greater than a charging parameter of the first charging mode and less than a charging parameter of the second charging mode.

4. The method according to claim 3, characterized in that The method further comprises: When the charging mode switching condition is met and the current charging mode is the third charging mode, the charging mode of the electronic device is switched to the second charging mode.

5. The method according to claim 4, characterized in that The method further comprises: In response to the charging protection mode being turned on, determining whether the charging start time is within a preset time period; If it is determined that the charging start time is within a preset time period, obtaining the number of times the electronic device is charged in a preset charging state during the historical period, wherein the preset charging state is used to indicate that the number of times the screen of the electronic device is turned on during one charging process is less than or equal to a first preset number of times, and the screen-on duration is less than or equal to the first preset duration; When the number of times the electronic device is charged in the preset charging state is greater than or equal to a preset value, the electronic device is controlled to charge in the first charging mode.

6. The method according to claim 5, characterized in that The method further comprises: Obtaining a charging duration of the electronic device during a charging process, as well as the number of times and duration of screen lighting during the charging duration; In response to the charging duration being within the preset time period, when the screen-on number of times is less than or equal to a first preset number, and the screen-on duration is less than or equal to a first preset duration, the recorded number of times charging is performed in the preset charging state is updated.

7. The method according to claim 6, characterized in that The method further comprises: In response to the charging duration being at least partially outside the preset time period, clearing the recorded number of times charging is performed in the preset charging state; and / or, When the screen-on number of times is greater than a first preset number of times, or the screen-on duration is greater than a first preset duration, the recorded number of times charging is performed in the preset charging state is cleared.

8. The method according to claim 5, characterized in that When the number of times the electronic device is charged in the preset charging state is greater than or equal to a preset value, controlling the electronic device to charge in the first charging mode includes: When the number of times the electronic device is charged in the preset charging state is greater than or equal to a preset value, determining whether the electronic device is in a locked screen state; In response to the electronic device being in a screen lock state, controlling the electronic device to charge in the first charging mode.

9. The method according to any one of claims 1 to 8, characterized in that: The charging parameter includes at least one of a charging current, a charging voltage and a charging power.

10. A charging device, characterized in that: The device comprises: A screen lighting module, used to light up the screen of the electronic device during charging; The first switching module is used to switch the charging mode of the electronic device to adjust the charging parameters of the electronic device according to the screen-on information of the electronic device and the current charging mode of the electronic device.

11. An electronic device, characterized in that: include: a memory for storing processor-executable instructions; A processor connected to the memory; Wherein, the processor is used to execute the charging method as described in any one of claims 1 to 9. 12 . A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a computer, the computer is enabled to perform the charging method according to any one of claims 1 to 9.