Charging method and device, electronic equipment, storage medium and program product
By using inertial sensors in electronic devices to determine placement status and operating parameters, and adjusting charging strategies accordingly, the problem of insufficient flexibility during charging is solved, resulting in more efficient power management and improved user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING XIAOMI MOBILE SOFTWARE CO LTD
- Filing Date
- 2024-10-08
- Publication Date
- 2026-04-10
AI Technical Summary
In existing technologies, the charging process of electronic devices lacks flexibility and cannot adapt to different charging scenarios, resulting in a significant impact of charging strategies on user experience.
By collecting sensing data from inertial sensors within electronic devices, it can determine whether the device is in a stationary state and adjust the charging strategy based on operating parameters, including adjusting charging parameters and charging speed, to adapt to different usage states and power thresholds, thus achieving flexible charging.
It improves the flexibility and adaptability of charging electronic devices, reduces the negative impact of different charging strategies on user experience, and ensures the effectiveness of charging speed and power management in different scenarios.
Smart Images

Figure CN121840862A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the field of charging, and in particular, to a charging method and device, an electronic device, a storage medium, and a program product. BACKGROUND
[0002] In the related art, the electronic device with a battery can be charged when the user needs it.
[0003] However, the related art does not take into account the user's power consumption needs, and in most cases, the electronic device is generally charged according to the same charging parameters. At this time, the flexibility of charging the electronic device is low, and the adaptability to different charging scenarios is poor. SUMMARY
[0004] To overcome the problems in the related art, the present disclosure provides a charging method, device, electronic device, storage medium, and program product to improve the flexibility of charging the electronic device while reducing the impact of using different charging strategies on the user.
[0005] According to a first aspect of an embodiment of the present disclosure, a charging method is provided, the method comprising:
[0006] determining whether the electronic device is in a placed state based on sensor data collected by an inertial sensor in the electronic device;
[0007] in a case where the electronic device is in the placed state, determining a charging strategy corresponding to a running parameter of the electronic device, and charging the electronic device based on the charging strategy;
[0008] wherein the charging strategies corresponding to different running parameters are different.
[0009] In one embodiment, in a case where the electronic device is in the placed state, determining a charging strategy corresponding to a running parameter of the electronic device, and charging the electronic device based on the charging strategy, comprises:
[0010] in a case where the electronic device is in the placed state, determining whether the electronic device is in a use state based on the running parameter of the electronic device;
[0011] in a case where the electronic device is in the use state and the remaining power of the electronic device is less than a first threshold, adjusting an initial charging parameter of the electronic device, and charging the electronic device based on the first charging parameter obtained by the adjustment; or
[0012] in a case where the electronic device is in the idle state and the remaining power of the electronic device is less than a second threshold, adjusting an initial charging parameter of the electronic device, and charging the electronic device based on the second charging parameter obtained by the adjustment;
[0013] wherein the first threshold is greater than the second threshold.
[0014] In one embodiment, the method further comprises:
[0015] In a case where the electronic device is in the use state, if the remaining power of the electronic device is greater than a third threshold, the first charging parameter of the electronic device is restored to the initial charging parameter; or,
[0016] In a case where the electronic device is in the idle state, if the remaining power of the electronic device is greater than a fourth threshold, the second charging parameter of the electronic device is restored to the initial charging parameter.
[0017] wherein the third threshold is greater than the fourth threshold.
[0018] In one embodiment, in a case where the electronic device is in the use state and the remaining power of the electronic device is less than the first threshold, the initial charging parameter of the electronic device is adjusted, comprising:
[0019] In a case where the electronic device is in the use state, the first threshold is determined based on the use state; wherein the electronic device generates different power consumptions in different use states, and the first threshold is positively correlated with the power consumption;
[0020] In a case where the remaining power of the electronic device is less than the first threshold, the initial charging parameter of the electronic device is adjusted based on the use state.
[0021] In one embodiment, in a case where the remaining power of the electronic device is less than the first threshold, the initial charging parameter of the electronic device is adjusted based on the use state, comprising:
[0022] In a case where the remaining power is less than the first threshold, an adjustment value corresponding to the use state is determined based on the power consumption generated by the electronic device in the use state; wherein the adjustment value is positively correlated with the power consumption;
[0023] The initial charging parameter of the electronic device is increased based on the adjustment value to obtain the first charging parameter.
[0024] In one embodiment, in a case where the electronic device is in the idle state and the remaining power is less than the second threshold, the initial charging parameter of the electronic device is adjusted, comprising:
[0025] In a case where the electronic device is in the idle state and the remaining power of the electronic device is less than the second threshold, the initial charging parameter of the electronic device is increased based on a preset adjustment value to obtain the second charging parameter.
[0026] In one embodiment, in a case where the electronic device is in the idle state, whether the electronic device is in the use state is determined based on a running parameter of the electronic device, comprising:
[0027] In a case where the electronic device is in the placed state, determine, based on the sensing data, whether the electronic device is in a target posture;
[0028] In a case where the electronic device is in the target posture, determine, based on a running parameter of the electronic device, whether the electronic device is in a use state.
[0029] In an embodiment, the determining, based on the sensing data, whether the electronic device is in the target posture, comprises: determining, based on the sensing data, an inclination angle of the electronic device relative to a horizontal direction;
[0030] If the inclination angle is greater than a preset angle threshold, it is determined that the electronic device is in the target posture;
[0031] If the inclination angle is less than or equal to the angle threshold, it is determined that the electronic device is not in the target posture.
[0032] In an embodiment, the method further comprises:
[0033] In a case where the electronic device is in the placed state and the electronic device is not in the target posture, if a remaining power of the electronic device is less than a second threshold, adjusting an initial charging parameter of the electronic device, and charging the electronic device according to a second charging parameter obtained by the adjusting.
[0034] In an embodiment, the method further comprises:
[0035] In a case where the electronic device is in the placed state and the electronic device is not in the target posture, if a remaining power of the electronic device is greater than a fourth threshold, restoring a second charging parameter of the electronic device to an initial charging parameter.
[0036] In an embodiment, the determining, based on the sensing data collected by the inertial sensor in the electronic device, whether the electronic device is in the placed state, comprises:
[0037] Determining, based on the sensing data, whether a duration that the electronic device is in a stationary state is greater than a preset duration;
[0038] If the duration is greater than the preset duration, it is determined that the electronic device is in the placed state.
[0039] According to a second aspect of the embodiments of the present disclosure, a charging device is provided, which comprises:
[0040] A determining module, configured to determine, based on sensing data collected by an inertial sensor in the electronic device, whether the electronic device is in a placed state;
[0041] The charging module is configured to determine a charging strategy corresponding to an operating parameter of the electronic device when the electronic device is in a placed state, and charge the electronic device based on the charging strategy.
[0042] Different charging strategies correspond to different operating parameters.
[0043] According to a third aspect of the embodiments of the present disclosure, an electronic device is provided, comprising:
[0044] a processor;
[0045] a memory for storing computer programs or instructions;
[0046] The processor executes the computer programs or instructions to implement the steps in any of the charging methods in the first aspect.
[0047] According to a fourth aspect of the embodiments of the present disclosure, a non-transitory computer readable storage medium is provided, comprising:
[0048] When the computer programs or instructions in the storage medium are executed by the processor, the steps in any of the charging methods in the first aspect are implemented.
[0049] According to a fifth aspect of the embodiments of the present disclosure, a computer program product is provided, comprising computer programs or instructions, which, when executed by a processor, implement the steps in any of the charging methods in the first aspect.
[0050] The technical solutions provided by the embodiments of the present disclosure can include the following beneficial effects:
[0051] In the embodiments of the present disclosure, when the electronic device is in a placed state, i.e., when the electronic device is in a state not in contact with the user, the charging strategy corresponding to the operating parameter can be determined according to the operating parameter inside the electronic device. Moreover, different charging strategies can be flexibly adopted to charge the electronic device according to different operating parameters. In this way, the flexibility of charging the electronic device is improved, and the impact on the user caused by using different charging strategies is reduced.
[0052] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF DRAWINGS
[0053] The accompanying drawings, which are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure and, together with the specification, serve to explain the principles of the present disclosure.
[0054] Figure 1 is a flowchart of a charging method according to an exemplary embodimentFigure 1 .
[0055] Figure 2 This is a schematic diagram of a gyroscope sensor according to an exemplary embodiment.
[0056] Figure 3 This is a flowchart illustrating a charging method according to an exemplary embodiment. Figure 2 .
[0057] Figure 4 This is a flowchart illustrating a charging method according to an exemplary embodiment. Figure 3 .
[0058] Figure 5 This is a structural block diagram of a charging device according to an exemplary embodiment.
[0059] Figure 6 This is a structural block diagram of an electronic device according to an exemplary embodiment.
[0060] Figure 7 This is a block diagram of an apparatus according to an exemplary embodiment.
[0061] Figure description: First rotation axis 1, second rotation axis 2, third rotation axis 3. Detailed Implementation
[0062] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0063] The charging method shown in this embodiment can be applied to electronic devices. Here, the electronic device may include a mobile terminal or a fixed terminal. The mobile terminal may include devices such as mobile phones, tablets, laptops, and in-vehicle terminals. The fixed terminal may include desktop computers, smart TVs, etc. In one embodiment, the operating system of the electronic device may include an Input Output System (IOS) operating system, an Android operating system, etc.
[0064] It should be noted that the electronic device can include, but is not limited to, a mobile communication terminal, a portable entertainment device, a wearable device, a household appliance, an augmented reality device, a virtual reality device, and a special-purpose device. Among them, the mobile communication terminal can include, but is not limited to, a mobile phone, a tablet computer, a smart watch, and the like; the portable entertainment device can include, but is not limited to, a digital camera; the wearable device can include, but is not limited to, a smart bracelet and smart glasses; the household appliance can include, but is not limited to, a television and a video recorder; the augmented reality (AR) device can include, but is not limited to, AR glasses; the virtual reality (VR) device includes, but is not limited to, VR glasses; and the special-purpose device includes, but is not limited to, a professional camera (such as a single-lens reflex camera, a card-type camera).
[0065] It should be noted that the execution subject of the embodiments of the present disclosure can be a central processing unit (CPU) in the electronic device in hardware, and can be a related background service or application program in the electronic device in software, and the present disclosure is not limited thereto.
[0066] Based on this, Figure 1 is a flowchart of a charging method according to an example embodiment, as Figure 1 shown, the method comprises:
[0067] Step 11, based on the sensor data collected by the inertial sensor in the electronic device, determining whether the electronic device is in a placed state.
[0068] In one embodiment, the inertial sensor in the electronic device can include, but is not limited to, at least one of the following: an acceleration sensor, a gravity sensor, and a gyroscope sensor.
[0069] In one embodiment, the placed state can be a state in which the electronic device is placed on a preset object. For example, the placed state can be a state in which the electronic device is placed on a support frame, or the placed state can be a state in which the electronic device is placed on a desktop. It should be noted that the placed state can be understood as a non-holding state, that is, when the user does not hold the electronic device and places the electronic device on other objects, the electronic device is in a placed state. That is, the placed state is a state in which the electronic device is not in contact with the user.
[0070] In one embodiment, it can be determined whether the electronic device is in a charging state, and if the electronic device is in a charging state, based on the sensor data collected by the inertial sensor and based on the collected sensor data, it is determined whether the electronic device is in a placed state. If the electronic device is not in a charging state, the determination of whether the electronic device is in a placed state can not be based on the collected sensor data.
[0071] In a case where the electronic device is in the holding state, the charging strategy corresponding to the running parameter of the electronic device is determined, and the electronic device is charged based on the charging strategy corresponding to the running parameter.
[0072] The charging strategy corresponding to different running parameters is different.
[0073] It should be noted that, in a case where the electronic device is in the holding state, if the electronic device is charged based on the charging strategy corresponding to the running parameter, the use process of the user using the electronic device will be affected. For example, in the process of charging the electronic device based on the charging strategy corresponding to the running parameter, the charging parameter of the electronic device may be increased. At this time, if the charging parameter of the electronic device is increased in a case where the electronic device is in the holding state, the temperature of the electronic device will be increased, thereby reducing the experience of the user.
[0074] Based on this, in the present disclosure, it can be determined whether the electronic device is in the placed state first, and then the electronic device is charged based on the charging strategy corresponding to the running parameter in a case where it is determined that the electronic device is in the placed state, thereby avoiding the problem of reducing the experience of the user caused by adjusting the charging parameter. For example, the charging parameter of the electronic device can be increased based on the charging strategy corresponding to the running parameter in a case where the electronic device is in the placed state. At this time, the charging speed of the electronic device can be improved on the premise of ensuring that the user has a good user experience.
[0075] In an embodiment, the running parameter of the electronic device includes at least one of the following: the type of the running application program and / or the number of the running application program.
[0076] In an embodiment, determining the charging strategy corresponding to the running parameter of the electronic device can include: determining the power consumption generated by the electronic device when running based on the running parameter of the electronic device; and determining the charging strategy corresponding to the power consumption of the electronic device.
[0077] In an embodiment, the power consumption generated by the electronic device when running can be determined based on the number and / or type of the application program running in the electronic device.
[0078] It should be noted that, in a case where the number of the application program running in the electronic device is different, the power consumption generated by the electronic device can be different. The power consumption generated by the electronic device can be positively correlated with the number of the application program. That is, the more the number of the application program running in the electronic device, the greater the power consumption generated by the electronic device.
[0079] It should be noted that the power consumption generated by the electronic device can be different in the case of different types of application programs running in the electronic device. There can be a corresponding relationship between the type of application program running in the electronic device and the power consumption generated by the electronic device when running the application program. For example, the application program can include a game type application program and a reading type application program. The power consumption generated by the electronic device when running the game type application program is greater than the power consumption generated by the application program when running the reading type application program.
[0080] In one embodiment, at least two power consumption intervals can be pre-set, and different power consumption intervals indicate different power consumptions. The charging strategy corresponding to the power consumption of the electronic device can be determined based on the power consumption interval in which the power consumption of the electronic device is located. Different charging strategies corresponding to different power consumption intervals.
[0081] In one embodiment, the charging strategy corresponding to the running parameter can include a strategy of adjusting the charging parameter of the electronic device. Illustratively, the charging strategy corresponding to the running parameter can be a strategy of adjusting the charging parameter of the electronic device to a target charging parameter, and different running parameters correspond to different target charging parameters. The charging parameter can include at least one of the following: charging power, charging voltage, and charging current value. It should be noted that the charging parameter and the charging speed of the electronic device are positively correlated.
[0082] In one embodiment, in the case that the electronic device is in a placed state, determining the charging strategy corresponding to the running parameter of the electronic device and charging the electronic device based on the charging strategy corresponding to the running parameter, includes: determining the target charging parameter corresponding to the running parameter of the electronic device; adjusting the initial charging parameter of the electronic device to the target charging parameter.
[0083] In one embodiment, the power consumption generated by the electronic device can be determined based on the running parameter; the target charging parameter can be determined based on the power consumption generated by the electronic device; and the power consumption generated by the electronic device and the target charging parameter are positively correlated.
[0084] In one embodiment, in the case that the electronic device is in a held state, the electronic device can be charged based on a pre-set first charging strategy. It should be noted that when the electronic device is not in a placed state, the electronic device is in a held state. When the electronic device is in a placed state, the electronic device is in a state not in contact with the user.
[0085] In one embodiment, charging the electronic device based on the pre-set first charging strategy includes charging the electronic device according to an initial charging parameter.
[0086] In an embodiment, in a case where the electronic device switches from the holding state to the placing state, the charging strategy of the electronic device can be adjusted from the first charging strategy to a charging strategy corresponding to the running parameter, and the electronic device is charged based on the charging strategy corresponding to the running parameter.
[0087] In an embodiment, the target charging parameter can be greater than the initial charging parameter. At this time, the charging speed corresponding to the target charging parameter is greater than the charging speed corresponding to the initial charging parameter.
[0088] In an embodiment, an adjustment value corresponding to the running parameter is determined, and the initial charging parameter is adjusted to the target charging parameter based on the adjustment value corresponding to the running parameter. Different adjustment values corresponding to different running parameters are different.
[0089] In an embodiment, the power consumption generated by the electronic device can be determined based on the running parameter, and the adjustment value can be determined based on the power consumption generated by the electronic device. The power consumption generated by the electronic device and the adjustment value are positively correlated.
[0090] In an embodiment, the running parameter of the electronic device can be determined based on a preset period, and the electronic device can be charged based on the charging strategy corresponding to the changed running parameter in a case where the running parameter of the electronic device changes.
[0091] In an embodiment, in a case where the running parameter of the electronic device changes, the change amplitude of the running parameter of the electronic device can be determined, and whether to adjust the charging strategy for charging the electronic device can be determined based on the change amplitude of the running parameter. For example, in a case where the change amplitude of the running parameter is greater than a preset amplitude threshold, the charging strategy can be adjusted to a charging strategy corresponding to the changed running parameter, and the electronic device is charged based on the charging strategy corresponding to the changed running parameter. In a case where the change amplitude of the running parameter is less than the amplitude threshold, the charging strategy for charging the electronic device can not be adjusted. In this way, in a case where the running parameter of the electronic device changes greatly, the charging strategy for charging the electronic device can be dynamically adjusted. In a case where the running parameter of the electronic device changes slightly, the charging strategy for charging the electronic device is not adjusted, thereby reducing the resource overhead caused in the process of adjusting the charging strategy.
[0092] The present disclosure provides a detection method and a charging control method for determining whether an electronic device is in a placing state. The existing inertial sensor on the electronic device is used to accurately and efficiently determine whether the electronic device is in a placing state, effectively speed up charging and control the power of the electronic device in combination with the use scenario of the electronic device, and avoid power anxiety of the user of the electronic device.
[0093] In the embodiments of the present disclosure, when the electronic device is in a placed state, i.e., when the electronic device is in a state not in contact with the user, the running parameters inside the electronic device can be adapted to determine the charging strategy corresponding to the running parameters, so that different charging strategies are flexibly adopted to charge the electronic device for different running parameters. In this way, while improving the flexibility of charging the electronic device, the impact on the user caused by using different charging strategies can be reduced.
[0094] It should be noted that, with the development of humanization of electronic devices, the functions of electronic devices are more and more matched with actual life and more and more meet the actual life needs of people. In daily life, support frames (for example, mobile phone supports) for supporting electronic devices cannot be separated from people's life. People often put mobile phones on support frames to watch TV and video chat with others. As the battery of the electronic device is continuously consumed in the video or TV watching scene, the battery level of the electronic device is getting lower and lower. Generally, users will charge when the battery level is low, but if an emergency occurs and they need to go out, the battery level of the electronic device cannot provide enough support for the user. Therefore, it is necessary to refine and complete the mobile phone power management for this situation to avoid mobile phone user anxiety and customize detailed functions for users, which is of great significance to better meet the user's trial and provide a better user experience.
[0095] Based on this, in one embodiment, when the electronic device is in a placed state, a charging strategy corresponding to a running parameter of the electronic device is determined, and the electronic device is charged based on the charging strategy, comprising:
[0096] When the electronic device is in a placed state, whether the electronic device is in a use state is determined based on the running parameter of the electronic device;
[0097] When the electronic device is in a use state and the remaining power of the electronic device is less than a first threshold, the initial charging parameter of the electronic device is adjusted, and the electronic device is charged based on the first charging parameter obtained by the adjustment; or,
[0098] When the electronic device is in an idle state and the remaining power of the electronic device is less than a second threshold, the initial charging parameter of the electronic device is adjusted, and the electronic device is charged based on the second charging parameter obtained by the adjustment;
[0099] Wherein, the first threshold is greater than the second threshold.
[0100] It should be noted that the electronic device in an idle state can be understood as the electronic device not being in a use state.
[0101] Exemplarily, the first threshold value can be 35% of the battery capacity. The second threshold value can be 20% of the battery capacity. At this time, in a case where the electronic device is in the use state and the remaining power of the electronic device is less than 35% of the battery capacity, the initial charging parameter of the electronic device can be adjusted, and the electronic device can be charged based on the first charging parameter obtained by the adjustment; in a case where the electronic device is in the idle state and the remaining power of the electronic device is less than 20% of the battery capacity, the initial charging parameter of the electronic device can be adjusted, and the electronic device can be charged based on the first charging parameter obtained by the adjustment.
[0102] It should be noted that the charging strategy corresponding to the running parameter further includes a strategy of adjusting the initial charging parameter of the electronic device in response to the first trigger condition. The first trigger condition corresponding to different running parameters is different. For example, in a case where it is determined based on the running parameter that the electronic device is in the use state, the first trigger condition is that the remaining power of the electronic device is less than the first threshold value. In a case where it is determined based on the running parameter that the electronic device is in the idle state, the first trigger condition is that the remaining power of the electronic device is less than the second threshold value.
[0103] It should be noted that the target charging parameter of any of the embodiments of the present disclosure can be the first charging parameter or the second charging parameter.
[0104] In an embodiment, the use state of the electronic device can be understood as the bright screen state of the electronic device, and the idle state of the electronic device can be understood as the dark screen state of the electronic device.
[0105] In an embodiment, the running parameter of the electronic device can include a display parameter of the display screen of the electronic device. The display parameter can be used to determine whether the electronic device is in the bright screen state or the dark screen state. For example, in a case where it is determined based on the display parameter that the display screen displays a picture, it is determined that the electronic device is in the bright screen state, and in a case where it is determined based on the display parameter that the display screen does not display a picture, it is determined that the electronic device is in the dark screen state.
[0106] In an embodiment, based on the running parameter of the electronic device, it is determined whether an application program is running in the electronic device; if the application program is running in the electronic device, it is determined that the electronic device is in the use state; if the application program is not running in the electronic device, it is determined that the electronic device is in the idle state.
[0107] Exemplarily, in a case where a video application program or a call application program is running in the electronic device, it can be determined that the electronic device is in the use state. At this time, the user can use the electronic device to watch a video through the video application program or use the call application program to communicate with other users, resulting in high running power consumption of the electronic device and slow charging speed.
[0108] In an embodiment, based on the running parameter of the electronic device, it is determined whether the number of applications running in the electronic device is greater than a preset number threshold. If the number is greater than the number threshold, it is determined that the electronic device is in a use state. If the number is less than the number threshold, it is determined that the electronic device is not in a use state.
[0109] In an embodiment, based on the running parameter of the electronic device, it is determined whether the number of applications running in the electronic device is greater than a preset number threshold. If the number is greater than the number threshold, it is determined that the electronic device is in a use state. If the number is less than the number threshold, it is determined that the electronic device is not in a use state.
[0110] In an embodiment, the initial charging parameter of the electronic device is adjusted, which can be increased to obtain a first charging parameter or a second charging parameter. The electronic device can be charged based on the first charging parameter or the second charging parameter. Here, the charging speed corresponding to the first charging parameter and the second charging parameter is greater than the charging speed corresponding to the initial charging parameter. In this way, when the electronic device is in a placed state, the charging speed of the electronic device can be increased by increasing the charging parameter of the electronic device when the use amount of the electronic device is less than a certain value, thereby alleviating the power anxiety of the electronic device.
[0111] It should be noted that when the electronic device is in a placed state, the electronic device can be in a use state or an idle state. When the electronic device is in an idle state, the charging speed of the electronic device is fast, so only simple charging acceleration is needed when the remaining power is less than the second threshold. At this time, the power demand of the user using the electronic device without charging can be met. For example, when the user needs to go out in an emergency, the charging speed of the electronic device can be increased by charging acceleration, so that the remaining power of the electronic device is quickly increased to the power that can support the user to use for a long time outdoors. When the electronic device is in a use state, the electronic device is charging while consuming power, at this time, the charging speed is slow, and even the power of the electronic device may continue to decrease. Therefore, the electronic device needs to be accelerated in advance when the remaining power is high, so that it can meet the user's demand.
[0112] That is, in the case that the power consumption generated when the electronic device is in the use state is lower than the power consumption generated when the electronic device is in the idle state, that is, in the case that the charging speed when the electronic device is in the use state is slower than the charging speed when the electronic device is in the idle state, the charging speed-up can be performed when the electronic device is in the use state and the remaining power is large, and the charging speed-up can be performed when the electronic device is in the idle state and the remaining power is small. In this way, the electronic device can be quickly charged regardless of whether the electronic device is in the use state or the idle state, so that the remaining power of the electronic device can reach the requirement of supporting the user to continuously use the electronic device for a long time in a short time, thereby improving the user experience.
[0113] In one embodiment, in the case that the electronic device is in the use state and the remaining power of the electronic device is less than the first threshold value, the initial charging parameter of the electronic device is adjusted, and the electronic device is charged based on the first charging parameter obtained by the adjustment, including: in the case that the electronic device is in the use state and the remaining power of the electronic device is less than the first threshold value, the initial charging parameter of the electronic device is increased to obtain a third charging parameter; the third charging parameter is adjusted based on the ambient temperature of the placement environment of the electronic device and / or the posture of the electronic device to obtain a first charging parameter, and the electronic device is charged based on the first charging parameter.
[0114] In one embodiment, the third charging parameter is adjusted based on the ambient temperature to obtain the first charging parameter, including: in the case that the ambient temperature is greater than a preset fifth threshold value, the third charging parameter is reduced to obtain the first charging parameter. In the case that the ambient temperature is less than the fifth threshold value, the third charging parameter is increased to obtain the first charging parameter.
[0115] Exemplarily, in the case that two electronic devices are stacked, the initial charging parameter can be first increased to the third charging parameter to improve the charging speed of the electronic device; in the case that the ambient temperature between the two electronic devices is high, the third charging parameter can be reduced to the first charging parameter to reduce the temperature of the electronic device and reduce the case that the two stacked electronic devices are affected by the temperature of the other. It should be noted that at this time, the first charging parameter can be greater than the preset charging parameter, or the first charging parameter can also be less than the preset charging parameter, which is not limited.
[0116] In one embodiment, the first adjustment value can be determined based on the deviation value between the ambient temperature and the fifth threshold value; the third charging parameter can be adjusted based on the first adjustment value to obtain the first charging parameter. The deviation value between the ambient temperature and the fifth threshold value can be positively correlated with the first adjustment value. It should be noted that the adjustment value in the present disclosure can indicate the adjustment amplitude of the adjustment of the charging parameter, and the adjustment value is positively correlated with the adjustment amplitude.
[0117] In an embodiment, the third charging parameter is adjusted based on the posture of the electronic device to obtain the first charging parameter, including: in a case where the posture of the electronic device is a target posture, the third charging parameter is increased to obtain the first charging parameter; in a case where the posture of the electronic device is not the target posture, the third charging parameter is reduced to obtain the first charging parameter. The inclination angle of the electronic device in the target posture can be greater than a preset angle threshold.
[0118] It should be noted that the inclination angle of the electronic device and the heat dissipation performance of the electronic device can be positively correlated. That is, the greater the inclination angle of the electronic device, the better the air circulation around the electronic device, and the better the heat dissipation performance of the heat dissipation module in the electronic device for heat dissipation. At this time, the third charging parameter of the electronic device can be appropriately increased, so as to improve the charging speed of the electronic device. And in the case where the temperature of the electronic device rises, the better heat dissipation performance of the electronic device can be used to dissipate heat for the electronic device, so as to reduce the case where the temperature of the electronic device is too high.
[0119] In an embodiment, the second adjustment value can be determined based on the deviation value between the inclination angle corresponding to the posture of the electronic device and the angle threshold; the third charging parameter can be adjusted based on the second adjustment value to obtain the first charging parameter. The deviation value between the inclination angle corresponding to the posture of the electronic device and the angle threshold can be positively correlated with the second adjustment value.
[0120] In an embodiment, in a case where the electronic device is in an idle state and the remaining power of the electronic device is less than a second threshold, the initial charging parameter of the electronic device is adjusted, and the electronic device is charged based on the second charging parameter obtained by the adjustment, including: in a case where the electronic device is in an idle state and the remaining power of the electronic device is less than a second threshold, the initial charging parameter of the electronic device is increased to obtain a fourth charging parameter; the fourth charging parameter is adjusted based on the environmental temperature of the placement environment of the electronic device and / or the posture of the electronic device to obtain a second charging parameter, and the electronic device is charged based on the second charging parameter.
[0121] In an embodiment, the third charging parameter is greater than the fourth charging parameter.
[0122] In an embodiment, the fourth charging parameter is adjusted based on the environmental temperature to obtain the second charging parameter, including: in a case where the environmental temperature is greater than a preset fifth threshold, the fourth charging parameter is reduced to obtain the second charging parameter. In a case where the environmental temperature is less than the fifth threshold, the fourth charging parameter is increased to obtain the second charging parameter.
[0123] In an embodiment, the third adjustment value can be determined based on a deviation value between the ambient temperature and a fifth threshold value; the fourth charging parameter can be adjusted based on the third adjustment value to obtain the second charging parameter. The deviation value between the ambient temperature and the fifth threshold value can be positively correlated with the second adjustment value.
[0124] In an embodiment, the fourth charging parameter can be adjusted based on the posture of the electronic device to obtain the second charging parameter, including: in a case where the posture of the electronic device is a target posture, the fourth charging parameter is increased to obtain the second charging parameter; in a case where the posture of the electronic device is not the target posture, the fourth charging parameter is decreased to obtain the second charging parameter. The inclination angle of the electronic device in the target posture can be greater than a preset angle threshold.
[0125] In an embodiment, the fourth adjustment value can be determined based on a deviation value between an inclination angle corresponding to the posture of the electronic device and an angle threshold value; the fourth charging parameter can be adjusted based on the fourth adjustment value to obtain the second charging parameter. The deviation value between the inclination angle corresponding to the posture of the electronic device and the angle threshold value can be positively correlated with the fourth adjustment value.
[0126] In an embodiment, in a case where the temperature of the electronic device reaches a temperature threshold value, or the temperature of the electronic device is less than the temperature threshold value and a difference between the temperature of the electronic device and the temperature threshold value is less than a preset difference threshold value, the current charging parameter of the electronic device is adjusted to obtain a third charging parameter, and the electronic device is charged according to the third charging parameter. The third charging parameter is less than the current charging parameter of the electronic device. The current charging parameter can be a preset charging parameter, the first charging parameter or the second charging parameter of any embodiment of the present disclosure.
[0127] It should be noted that the temperature threshold value can be configured in the electronic device, and the charging parameter of the electronic device is adjusted based on the temperature threshold value, so as to control the temperature of the electronic device. For example, in a case where the temperature of the electronic device is less than the temperature threshold value and a difference between the temperature of the electronic device and the temperature threshold value is less than a preset difference threshold value, the current charging parameter of the electronic device is reduced, so as to reduce the temperature of the electronic device and / or reduce the temperature rise rate of the electronic device, thereby reducing the case where the temperature of the electronic device is greater than the temperature threshold value, and controlling the charging temperature of the electronic device.
[0128] It should be noted that in a case where the charging temperature of the electronic device is controlled based on the temperature threshold value, the maximum charging parameter that can be used by the electronic device is positively correlated with the temperature threshold value.
[0129] In an embodiment, the initial temperature threshold of the electronic device is adjusted to obtain a first temperature threshold when the electronic device is in a use state and the remaining power of the electronic device is less than a first threshold. The first temperature threshold is greater than the initial temperature threshold.
[0130] In an embodiment, the initial charging parameter of the electronic device is adjusted based on the first temperature threshold to obtain a first charging parameter, and the electronic device is charged based on the first charging parameter. The first temperature threshold and the first charging parameter are positively correlated.
[0131] It should be noted that when the remaining power of the electronic device is small, the temperature threshold of the electronic device can be increased from the initial temperature threshold to the first temperature threshold, so that the temperature control range of the electronic device can be relaxed. At this time, the initial charging parameter of the electronic device can be flexibly adjusted in a larger temperature control range, for example, the initial charging parameter can be increased to the first charging parameter based on a higher adjustment amplitude. In this way, the temperature of the electronic device can be accurately controlled while the flexibility of adjusting the initial charging parameter of the electronic device to the first charging parameter is improved.
[0132] In an embodiment, the initial temperature threshold of the electronic device is adjusted to obtain a second temperature threshold when the electronic device is in an idle state and the remaining power of the electronic device is less than a second threshold. The first temperature threshold is greater than the initial temperature threshold.
[0133] In an embodiment, the initial charging parameter of the electronic device is adjusted based on the second temperature threshold to obtain a second charging parameter, and the electronic device is charged based on the second charging parameter. The second temperature threshold and the second charging parameter are positively correlated.
[0134] In an embodiment, the first temperature threshold is greater than the second temperature threshold.
[0135] It should be noted that since the power consumption of the electronic device in the use state is greater than the power consumption of the electronic device in the idle state, the first temperature threshold configured when the electronic device is in the use state can be greater than the second temperature threshold configured when the electronic device is in the idle state. In this way, when the electronic device consumes power at a fast speed, a higher temperature threshold can be used to relax the temperature control of the electronic device, so that the electronic device can be charged based on a larger charging parameter to quickly increase the charging speed of the electronic device.
[0136] In one embodiment, when the electronic device is in the use state, the initial temperature threshold is adjusted to the first temperature threshold based on a first temperature adjustment value. The first temperature threshold is greater than the preset temperature threshold. When the electronic device is in the idle state, the initial temperature threshold is adjusted to the second temperature threshold based on a second temperature adjustment value. The second temperature threshold is greater than the initial temperature threshold. Wherein, the first temperature adjustment value is greater than the second temperature adjustment value. Exemplarily, the first temperature threshold can be 1°. The second temperature threshold can be 0.5°.
[0137] In the embodiments of the present disclosure, the state of the electronic device can be determined based on the running parameter, and the corresponding power threshold for triggering the adjustment of the charging parameter can be set for different states, so as to timely adjust the charging parameter of the electronic device when the remaining power of the electronic device is less than the power threshold, and improve the timeliness of the adjustment of the charging parameter in all states.
[0138] In one embodiment, the method further comprises:
[0139] In the case that the electronic device is in the use state, if the remaining power of the electronic device is greater than a third threshold, the first charging parameter of the electronic device is restored to the initial charging parameter; or,
[0140] In the case that the electronic device is in the idle state, if the remaining power of the electronic device is greater than a fourth threshold, the second charging parameter of the electronic device is restored to the initial charging parameter.
[0141] Wherein, the third threshold is greater than the fourth threshold.
[0142] It should be noted that the charging strategy corresponding to the running parameter can also include a strategy of restoring the charging parameter of the electronic device to the initial charging parameter in response to a second trigger condition. The second trigger condition corresponding to different running parameters is different. For example, in the case that the electronic device is determined to be in the use state based on the running parameter, the second trigger condition is that the remaining power of the electronic device is greater than the third threshold. In the case that the electronic device is determined to be in the idle state based on the running parameter, the second trigger condition is that the remaining power of the electronic device is greater than the fourth threshold.
[0143] At this time, in the case that the electronic device is in the placed state, the initial charging parameter can be used to charge the electronic device when the remaining power of the electronic device is greater than a specific value. In this way, the remaining power of the electronic device can be ensured to support the user to continuously use the electronic device for a long time in any case, while reducing the change of the temperature of the electronic device caused by the adjustment of the charging parameter of the electronic device, and even affecting the performance of the device.
[0144] Exemplarily, the third threshold value can be 60% of the battery capacity, and the fourth threshold value can be 40% of the battery capacity. In a case where the electronic device is in the use state, if the remaining power of the electronic device is greater than or equal to 60% of the battery capacity, the first charging parameter of the electronic device is restored to the initial charging parameter. In a case where the electronic device is in the idle state, if the remaining power of the electronic device is greater than or equal to 40% of the battery capacity, the second charging parameter of the electronic device is restored to the initial charging parameter.
[0145] In one embodiment, in a case where the electronic device is in the use state, the third threshold value is determined based on the use state; wherein the electronic device generates different power consumptions in different use states, and the third threshold value is positively correlated with the power consumption.
[0146] In the embodiments of the present disclosure, in a case where the remaining power of the electronic device is greater than the third threshold value or the fourth threshold value, that is, in a case where it is ensured that the remaining power of the electronic device can support the user to continuously use the electronic device for a long time, the charging parameter of the electronic device can be restored to the initial charging parameter. At this time, in a case where the initial charging parameter is a standard charging parameter that the electronic device uses by default, if the remaining power of the electronic device meets the power demand of the user, the charging parameter of the electronic device can be timely restored to the safe and reliable initial charging parameter, and the electronic device will not be charged for a long time using the adjusted first charging parameter or the second charging parameter.
[0147] For example, in a case where the first charging parameter and the second charging parameter are greater than the initial charging parameter, if the remaining power of the electronic device meets the power demand of the user, the charging parameter of the electronic device can be timely restored to the initial charging parameter corresponding to a lower charging temperature, so that the case that the charging temperature of the electronic device continuously rises and causes the performance of the battery of the electronic device to be damaged can be reduced, and the service life of the battery of the electronic device can be improved.
[0148] In one embodiment, in a case where the electronic device is in the use state and the remaining power of the electronic device is less than the first threshold value, the initial charging parameter of the electronic device is adjusted, including:
[0149] In a case where the electronic device is in the use state, the first threshold value is determined based on the use state; wherein the electronic device generates different power consumptions in different use states, and the first threshold value is positively correlated with the power consumption;
[0150] In a case where the remaining power of the electronic device is less than the first threshold value, the initial charging parameter of the electronic device is adjusted based on the use state.
[0151] In an embodiment, the initial charging parameter of the electronic device is adjusted based on the usage state, including: adjusting the initial charging parameter of the electronic device to a first charging parameter based on the usage state. Different usage states correspond to different first charging parameters. For example, the power consumption of the electronic device in different usage states is different, and the first charging parameter is positively correlated with the power consumption.
[0152] In the embodiments of the present disclosure, on the one hand, when the electronic device is in a usage state, the first threshold value can be accurately determined according to the power consumption of the electronic device in each usage state, so as to timely trigger the adjustment of the charging parameter of the electronic device based on the first threshold value and the remaining power of the electronic device. On the other hand, when the remaining power of the electronic device is less than the first threshold value, the initial charging parameter of the electronic device can be adjusted in different ways according to different usage states. In this way, the timeliness and flexibility of adjusting the initial charging parameter of the electronic device can be ensured.
[0153] In an embodiment, when the remaining power of the electronic device is less than the first threshold value, the initial charging parameter of the electronic device is adjusted based on the usage state, including:
[0154] When the remaining power is less than the first threshold value, the adjustment value corresponding to the usage state is determined based on the power consumption of the electronic device in the usage state; wherein the adjustment value is positively correlated with the power consumption;
[0155] The initial charging parameter of the electronic device is increased based on the adjustment value to obtain a first charging parameter.
[0156] In order to distinguish the first adjustment value, the second adjustment value, the third adjustment value and the fourth adjustment value from the above, the adjustment value corresponding to the usage state will be referred to as the fifth adjustment value in the following.
[0157] In an embodiment, the adjustment value corresponding to the usage state is determined based on the power consumption of the electronic device in the usage state, including: adjusting the initial temperature threshold value of the electronic device to a first temperature threshold value based on the power consumption of the electronic device in the usage state; wherein the power consumption of the electronic device in the usage state is positively correlated with the first temperature threshold value; the fifth adjustment value corresponding to the first temperature threshold value can be determined; wherein the fifth adjustment value is positively correlated with the first temperature threshold value.
[0158] Here, the first temperature threshold for limiting the temperature of the electronic device can be flexibly determined based on the power consumption generated by the electronic device in the use state, so that the limitation on the temperature of the electronic device is relaxed in a larger range when the power consumption generated by the electronic device is high, and the charging parameter of the electronic device is increased by a larger fifth adjustment value. In this way, the charging speed of the electronic device can be accurately improved when the power consumption speed of the electronic device is fast. When the power consumption generated by the electronic device is low, the limitation on the temperature of the electronic device can be relaxed in a smaller range, and the charging speed of the electronic device is increased by a smaller adjustment value. In this way, the charging speed of the electronic device can be accurately improved when the power consumption speed of the electronic device is slow.
[0159] In one embodiment, the first temperature adjustment value can be determined based on the power consumption generated by the electronic device in the use state, and the first temperature adjustment value can be positively correlated with the power consumption generated by the electronic device in the use state. The initial temperature of the electronic device is adjusted to the first temperature threshold based on the first temperature adjustment value.
[0160] In the embodiments of the present disclosure, the power consumption generated by the electronic device in the use state is positively correlated with the fifth adjustment value for increasing the initial charging parameter of the electronic device, so that when the power consumption generated by the electronic device is large, the initial charging parameter of the electronic device is increased by a larger fifth adjustment value to effectively improve the charging speed of the electronic device. When the power consumption generated by the electronic device is small, the initial charging parameter of the electronic device is increased by a smaller fifth adjustment value to reduce the case that the temperature of the electronic device increases too much while improving the charging speed of the electronic device.
[0161] In one embodiment, when the electronic device is in the idle state and the remaining power is less than the second threshold, the initial charging parameter of the electronic device is adjusted, including:
[0162] When the electronic device is in the idle state and the remaining power of the electronic device is less than the second threshold, the initial charging parameter of the electronic device is increased based on a preset adjustment value to obtain a second charging parameter.
[0163] In one embodiment, the preset adjustment value can be smaller than the adjustment value corresponding to the use state in any of the embodiments of the present disclosure.
[0164] In the embodiments of the present disclosure, when the electronic device is in the idle state, the power consumption of the electronic device does not need to be determined by consuming computing resources, and the initial charging parameter of the electronic device can be directly adjusted to the second charging parameter based on the preset adjustment value. In this way, the charging speed of the electronic device can be accurately improved while reducing the power consumption generated by the electronic device.
[0165] In an embodiment, when the electronic device is in the placed state, whether the electronic device is in the use state is determined based on the running parameter of the electronic device, including:
[0166] When the electronic device is in the placed state, whether the electronic device is in the target posture is determined based on the sensing data.
[0167] When the electronic device is in the target posture, whether the electronic device is in the use state is determined based on the running parameter of the electronic device.
[0168] In an embodiment, when the electronic device is in the target posture, the difference between the first probability that the electronic device is in the use state and the second probability that the electronic device is in the idle state is less than a preset sixth threshold. That is, when the electronic device is in the target posture, it is necessary to determine whether the electronic device is in the use state.
[0169] In an embodiment, when the electronic device is not in the target posture, the difference between the first probability that the electronic device is in the use state and the second probability that the electronic device is in the idle state is greater than a preset sixth threshold, and the second probability is greater than the first probability. That is, when the electronic device is not in the target posture, the electronic device is more likely to be in the idle state.
[0170] In an embodiment, when the electronic device is not in the target posture, the electronic device can be charged according to a preset second charging strategy. The second charging strategy can be a charging strategy used when the electronic device is in the idle state. At this time, there is no need to obtain the running parameter, and there is no need to determine whether the electronic device is in the use state based on the running parameter to determine the charging strategy corresponding to the running parameter. In this way, the resource consumption of the electronic device can be reduced.
[0171] In an embodiment, whether the electronic device is in the target posture is determined based on the sensing data, including: determining the inclination angle of the electronic device relative to the horizontal direction based on the first sensing data. The first sensing data can be the angular velocity of at least one rotation axis provided in the electronic device.
[0172] In an embodiment, it can be determined whether the inclination angle meets a first condition. If the inclination angle meets the first condition, it is determined that the electronic device is in the target posture. If the inclination angle does not meet the first condition, it is determined that the electronic device is not in the target posture. The first condition can be that the first deviation value between the inclination angle of the electronic device and a preset angle is less than a first deviation threshold. The preset angle can be the angle when the electronic device is placed on a support frame. The support frame can be a charging support for charging the electronic device, or the support frame can be a mobile phone support.
[0173] In an embodiment, it can be determined whether the first duration that the electronic device is in the target posture is greater than a first preset duration. In a case where the first duration that the electronic device is in the target posture is greater than the first preset duration, it is determined, based on the running parameter of the electronic device, whether the electronic device is in the use state.
[0174] In an embodiment, determining whether the first duration that the electronic device is in the target posture is greater than the first preset duration comprises: determining, based on first sensor data collected by the inertial sensor at a preset frequency within the preset duration, an inclination angle of the electronic device relative to the horizontal direction at at least two time points within the preset duration; determining whether each inclination angle satisfies a first condition; wherein the first condition is that a deviation value between the inclination angle of the electronic device and a preset angle is less than a first deviation threshold; and determining, based on a number of inclination angles that satisfy the first condition among the inclination angles, whether the first duration that the electronic device is in the target posture is greater than the first preset duration.
[0175] In an embodiment, a third probability that the first duration is greater than the first preset duration can be determined based on a ratio between the number of inclination angles that satisfy the first condition and a total number of the inclination angles; and if the third probability is greater than a preset probability threshold, it is determined that the first duration that the electronic device is in the target posture is greater than the first preset duration.
[0176] In an embodiment of the present disclosure, when the electronic device is in the target posture, i.e., in a case where it is not possible to directly determine whether the electronic device is in the use state, the running parameter of the electronic device can be used to determine whether the electronic device is in the use state or the idle state. In this way, after accurately determining that the electronic device is in the use state or the idle state, the electronic device can be accurately charged based on the charging strategy corresponding to the use state or the idle state.
[0177] In an embodiment, determining, based on the sensor data, whether the electronic device is in the target posture comprises:
[0178] determining, based on the sensor data, an inclination angle of the electronic device relative to the horizontal direction;
[0179] if the inclination angle is greater than a preset angle threshold, determining that the electronic device is in the target posture;
[0180] if the inclination angle is less than or equal to the angle threshold, determining that the electronic device is not in the target posture.
[0181] In an embodiment, based on the first sensor data, an inclination angle of the electronic device relative to the horizontal direction is determined; wherein the first sensor data can be an angular velocity of at least one rotation axis of a gyroscope sensor in the electronic device.
[0182] In an embodiment, asFigure 2 As shown, the gyroscope sensor includes a first rotation axis 1, a second rotation axis 2 and a third rotation axis 3. Among them, the first rotation axis 1 or the second rotation axis 2 is aligned with the body direction of the electronic device. The third rotation axis 3 is usually perpendicular to the display screen of the electronic device. At this time, when the electronic device is placed on the support, a relatively fixed angle relative to the first rotation axis 1 or the second rotation axis 2 will be generated, which can be used to detect the inclination angle of the electronic device relative to the horizontal direction. It should be noted that the gyroscope sensor in the electronic device is usually attached to the mainboard inside the electronic device. At this time, the gyroscope sensor can be parallel to the mainboard.
[0183] Exemplarily, the first rotation axis 1 is the X axis in the gyroscope sensor, the second rotation axis 2 is the Y axis in the gyroscope sensor, and the third rotation axis 3 is the Z axis in the gyroscope sensor.
[0184] In one embodiment, based on the first sensing data, the attitude angle corresponding to at least one rotation axis of the gyroscope sensor can be determined. Based on the attitude angle corresponding to at least one rotation axis, the inclination angle of the electronic device relative to the horizontal direction can be determined.
[0185] In one embodiment, the sensing data in the gyroscope sensor can be input into a digital motion processing (DMP) engine to obtain a quaternion for representing the rotation state of each rotation axis.
[0186] In one embodiment, the expression formula corresponding to the quaternion is as follows
[0187] Q = (q x , q y , q z , q w ); (1);
[0188] In formula (1), q x , q y and q z are respectively used to indicate the direction component of the rotation axis in each coordinate axis in the preset three-dimensional space, and q w is used to indicate the rotation angle of the rotation axis in the preset three-dimensional space.
[0189] It should be noted that using DMP to determine the quaternion can reduce the load caused by the complex fusion calculation data, sensor synchronization and posture sensing processes.
[0190] In one embodiment, the attitude angle corresponding to the first rotation axis 1 is the roll angle, and the calculation formula of the roll angle can be as follows:
[0191]
[0192] wherein, in formula (2), roll is a roll angle, q x , q y and q z respectively indicate direction components of the rotation axis in respective coordinate axes of a preset three-dimensional space, q w indicates a rotation angle of the rotation axis in the preset three-dimensional space.
[0193] In an embodiment, the attitude angle corresponding to the second rotation axis 2 is a pitch angle, and a calculation formula of the pitch angle can be as follows:
[0194] pith = sin -1 a(q w q y -q x q z ) (3).
[0195] wherein, in formula (3), pith is a pitch angle, q x , q y and q z respectively indicate direction components of the rotation axis in respective coordinate axes of a preset three-dimensional space, q w indicates a rotation angle of the rotation axis in the preset three-dimensional space. a is a preset constant.
[0196] In an embodiment, the attitude angle corresponding to the third rotation axis 3 is a yaw angle, and a calculation formula of the yaw angle can be as follows:
[0197]
[0198] wherein, in formula (4), yaw is a yaw angle, q x , q y and q z respectively indicate direction components of the rotation axis in respective coordinate axes of a preset three-dimensional space, q w indicates a rotation angle of the rotation axis in the preset three-dimensional space.
[0199] In an embodiment, a bias angle of the electronic device in the horizontal direction can be determined; a tilt angle of the electronic device relative to the horizontal direction can be determined based on a difference between the attitude angle corresponding to at least one rotation axis and the bias angle. It should be noted that, due to unevenness of the electronic device body and non-parallelism between the electronic device and the gyroscope, the bias angle exists in the horizontal direction of the electronic device.
[0200] In one embodiment, the tilt angle of the electronic device in the setting direction of the rotation axis can be determined based on the difference between the posture angle corresponding to the rotation axis and the bias angle. The tilt angle of the electronic device in the horizontal direction can be determined based on the tilt angles of the electronic device in the setting directions of the rotation axes.
[0201] Exemplarily, the calculation formula for determining the tilt angle of the electronic device in the setting direction of the rotation axis can be as follows:
[0202] θ = θ1- θ2 (5);
[0203] In formula (5), θ is the tilt angle of the electronic device in the setting direction of the rotation axis, θ1 is the posture angle corresponding to the rotation axis, and θ2 is the bias angle.
[0204] It should be noted that in the process of determining the tilt angle of the electronic device relative to the horizontal direction, the posture angle corresponding to the rotation axis to be used needs to be determined according to the timing installation of the gyroscope. In general, the roll angle or the yaw angle can be used to determine the tilt angle of the electronic device relative to the horizontal direction.
[0205] In the embodiments of the present disclosure, the tilt angle of the electronic device relative to the horizontal direction can be used to accurately determine whether the electronic device is in the target posture, so as to further determine whether the electronic device is in the use state when the electronic device is in the target posture. In this way, the accuracy of triggering the determination of whether the electronic device is in the running state can be improved.
[0206] In one embodiment, the method further comprises:
[0207] In the case that the electronic device is in the placed state and the electronic device is not in the target posture, if the remaining power of the electronic device is less than the second threshold value, the initial charging parameter of the electronic device is adjusted, and the electronic device is charged according to the second charging parameter obtained by the adjustment.
[0208] It should be noted that the electronic device is not in the target posture, which can be understood as that the tilt angle of the electronic device relative to the horizontal direction is less than the angle threshold value.
[0209] Here, when the electronic device is not in the target posture, the inclination angle of the electronic device relative to the horizontal direction is small. At this time, the probability that the electronic device is in the idle state is relatively high. For example, when the electronic device is placed flat on a table, or when the electronic device is placed on a support frame and the support frame is parallel to the table, the electronic device is likely to be in the idle state. At this time, the electronic device can be charged according to the charging strategy corresponding to the idle state, without the need to determine the use state of the electronic device. In this way, resource consumption and power consumption generated in the process of determining whether the electronic device is in the use state can be reduced, thereby reducing the power consumption speed.
[0210] In one embodiment, when the electronic device is in the placed state and the electronic device is not in the target posture, if the remaining power of the electronic device is less than the second threshold value, the initial charging parameter of the electronic device can be increased based on a preset adjustment value to obtain a second charging parameter. The electronic device can be charged based on the second charging parameter.
[0211] In the embodiments of the present disclosure, on the one hand, when the electronic device is in the placed state and not in the target posture, it can be directly determined that the initial charging parameter of the electronic device needs to be adjusted, and it can be directly determined that the timing of adjusting the initial charging parameter of the electronic device is the moment when the remaining power of the electronic device is less than the second threshold value. At this time, there is no need to additionally obtain other parameters to determine the timing of adjusting the charging parameter of the electronic device. In this way, in the process of adjusting the initial charging parameter of the electronic device, resource consumption and power consumption generated can be reduced.
[0212] On the other hand, when the remaining power of the electronic device is less than the second power threshold value, that is, when the remaining power of the electronic device is insufficient to support the user to use the electronic device for a long time, relevant measures can be taken in time to adjust the initial charging parameter of the electronic device, and the electronic device is charged according to the second charging parameter obtained by adjustment. In this way, the timeliness of adjusting the initial charging parameter of the electronic device can be improved.
[0213] In one embodiment, the method further includes:
[0214] When the electronic device is in the placed state and the electronic device is not in the target posture, if the remaining power of the electronic device is greater than the fourth threshold value, the second charging parameter of the electronic device is restored to the initial charging parameter.
[0215] In the embodiments of the present disclosure, in the case that the electronic device is in the placed state and is not in the target posture, the time when the second charging parameter of the electronic device is restored to the initial charging parameter can be directly determined as the time when the remaining power of the electronic device is greater than the fourth threshold. At this time, there is no need to additionally acquire other parameters to determine the time when the adjustment of the charging parameter of the electronic device is stopped. In this way, in the process of determining the need to stop adjusting the charging parameter of the electronic device, resource consumption and power consumption can be reduced.
[0216] On the other hand, in the case that the remaining power of the electronic device is greater than the fourth power threshold, that is, in the case that the remaining power of the electronic device is sufficient to support the user to use the electronic device for a longer time, the second charging parameter of the electronic device can be restored to the initial charging parameter in time. In this way, while ensuring that the power demand of the user can be met, the case that the temperature of the electronic device fluctuates greatly due to the continued use of the charging parameter different from the initial charging parameter to charge the electronic device is reduced.
[0217] In one embodiment, based on the sensing data collected by the inertial sensor in the electronic device, it is determined whether the electronic device is in a placed state, comprising:
[0218] Based on the sensing data, it is determined whether the duration that the electronic device is in a stationary state is greater than or equal to a preset duration;
[0219] If the duration is greater than the preset duration, it is determined that the electronic device is in a placed state.
[0220] It should be noted that, in order to distinguish from the first duration of the present disclosure, the duration that the electronic device is in a stationary state is referred to as a second duration below. In order to distinguish from the first preset duration of the present disclosure, the preset duration is referred to as a second preset duration below.
[0221] It should be noted that, since in the case that the user holds the electronic device, the user can produce shaking or movement, so that the electronic device cannot be continuously in a stationary state, therefore, in the case that the second duration that the electronic device is in a stationary state is greater than the second preset duration, it can be determined that the electronic device is in a placed state. That is, it can be determined that the electronic device is in a non-holding state not in contact with the user.
[0222] In one embodiment, based on the second sensing data, it can be determined whether the second duration that the electronic device is in a stationary state is greater than or equal to the second preset duration; wherein the second sensing data can be the acceleration of the electronic device.
[0223] It should be noted that the stationary state can be a state in which a second deviation value between the acceleration of the electronic device and a preset acceleration threshold is less than a preset second deviation threshold. Illustratively, the acceleration threshold can be zero, and the stationary state can be a state in which the acceleration of the electronic device is zero. Alternatively, the stationary state can be a state in which the acceleration of the electronic device is close to zero.
[0224] In one embodiment, the acceleration of the electronic device can be determined based on a first acceleration of a first rotation axis, a second acceleration of a second rotation axis, and a third acceleration of a third rotation axis within the electronic device.
[0225] In one embodiment, the calculation formula of the acceleration of the electronic device can be as follows:
[0226]
[0227] In formula (6), A cc is the acceleration of the electronic device, a x is the acceleration of the first rotation axis, a y is the acceleration of the second rotation axis, and a z is the acceleration of the third rotation axis.
[0228] In one embodiment, based on the sensor data, it is determined whether the duration that the electronic device is in the stationary state is greater than a preset duration, including: determining the acceleration of the electronic device at at least two time points based on the second sensor data obtained by the inertial sensor within the preset duration at a preset frequency; determining whether each acceleration satisfies a second condition; wherein the second condition is that a deviation value between the acceleration of the electronic device and an acceleration threshold is less than a preset second deviation threshold. Based on the number of accelerations that satisfy the second condition in each acceleration, it is determined whether the second duration that the electronic device is in the stationary state is greater than a second preset duration.
[0229] In one embodiment, based on the ratio between the number of accelerations that satisfy the second condition and the total number of each acceleration, a fourth probability that the second duration is greater than the second preset duration is determined; if the fourth probability is greater than a preset probability threshold, it is determined that the second duration is greater than the second preset duration.
[0230] In one embodiment, based on the sensor data, it is determined whether the electronic device is in the stationary state, and whether the electronic device is in the target posture. If the first duration that the electronic device is in the target posture is greater than a first preset duration, and the second duration that the electronic device is in the stationary state is greater than a second preset duration, it is determined that the electronic device is in the placed state. If the first duration that the electronic device is in the target posture is less than the first preset duration, or the second duration that the electronic device is in the stationary state is less than the second preset duration, it is determined that the electronic device is not in the placed state.
[0231] In the embodiments of the present disclosure, when the duration that the electronic device is in the stationary state is greater than or equal to the preset duration, it is determined again that the electronic device is in the placed state. In this way, the accuracy of determining that the electronic device is in the placed state can be improved by continuity detection, the case of mistakenly determining that the electronic device is in the placed state can be reduced, and the stability and robustness of the determination result of determining that the electronic device is in the placed state can be improved.
[0232] In addition, the existing gyroscope sensor data of the mobile phone can be used for detection, which can effectively avoid additional hardware costs, and the angle and acceleration of the gyroscope can be used to efficiently and accurately determine whether the electronic device is in the placed state.
[0233] Figure 3 is a flowchart of a charging method according to an example embodiment, as shown in Figure 3 , the method comprises:
[0234] Step 201, obtaining first sensor data and second sensor data;
[0235] The first sensor data is angular velocity sensor data, and the second sensor data is acceleration sensor data.
[0236] Step 202, determining the tilt angle of the electronic device based on the first sensor data, and determining the acceleration of the electronic device based on the second sensor data.
[0237] Step 203, determining whether the tilt angle of the electronic device satisfies a first condition and whether the acceleration of the electronic device satisfies a second condition.
[0238] The first condition is that the deviation value between the tilt angle of the electronic device and a preset angle is less than a first deviation threshold, and the second condition is that the deviation value between the acceleration of the electronic device and a preset acceleration is less than a second deviation threshold.
[0239] If the tilt angle of the electronic device satisfies the first condition and the acceleration satisfies the second condition, step 204 is performed; otherwise, step 205 is performed; wherein the formula for satisfying the first condition and the second condition is as follows:
[0240]
[0241] In formula (7), A cc is the acceleration of the electronic device, p is the acceleration threshold, and m is the second deviation threshold. is the tilt angle of the electronic device relative to the horizontal direction, q is the preset angle, and d is the first deviation threshold.
[0242] The detection can be performed within a preset time period T, where T = (t1, t2…t…). n ), corresponding to the detection result P = (p1, p2…p n ), p i For the purpose of t i The detection result is based on whether the tilt angle and acceleration corresponding to the constantly collected sensor data meet the conditions. Where p i The value can be either a first value or a second value. The first value indicates that the tilt angle of the electronic device meets the first condition and the acceleration of the electronic device meets the second condition. The second value indicates that the tilt angle of the electronic device does not meet the first condition and / or the acceleration of the electronic device does not meet the second condition. For example, the first value can be 1 and the second value can be 0.
[0243] Step 204, increase the number of times the condition is met;
[0244] The number of times the tilt angle of the electronic device satisfies the first condition and the acceleration of the electronic device satisfies the second condition is determined.
[0245] Step 205: Determine if the number of times the condition is satisfied reaches N.
[0246] If the number of times the condition is met reaches N, then proceed to step 206; if the number of times the condition is met does not reach N, then proceed to step 201.
[0247] Step 206: Based on the number of times the condition is met, determine the fifth probability that the electronic device is in a placed state;
[0248] The formula for calculating the fifth probability is as follows:
[0249]
[0250] In formula (8), Pos is the fifth probability, p i The value can be either a first value or a second value, where the first value can be 1 and the second value can be 0. n can be the number of tilt angles or accelerations determined within a preset time period.
[0251] Step 207: Determine whether the fifth probability is greater than a preset probability threshold;
[0252] Step 208: If the fifth probability is greater than the preset probability threshold, then the electronic device is determined to be in a placement state.
[0253] If Pos is greater than the probability threshold P, then the electronic device is determined to be in a placed state.
[0254] Step 209: If the fifth probability is less than the preset probability threshold, then it is determined that the electronic device is not in a placed state.
[0255] Figure 4 is a flowchart of a charging method according to an example embodiment, as Figure 4 shown, the method comprises: step 301, determining whether the electronic device is in a charging state.
[0256] wherein if the electronic device is in the charging state, step 302 is performed; if the electronic device is not in the charging state, the following steps are not performed.
[0257] Step 302, determining whether the electronic device is in a placement state.
[0258] wherein if the electronic device is in the placement state, step 303 is performed, otherwise, the following steps are not performed.
[0259] Step 303, determining whether the electronic device is in a use state.
[0260] wherein if the electronic device is in the use state, step 304 is performed; otherwise, step 310 is performed.
[0261] Step 304, determining whether the remaining power of the electronic device is less than a first threshold value.
[0262] wherein if the remaining power of the electronic device is less than the first threshold value, step 305 is performed, otherwise, step 309 is performed.
[0263] wherein the first threshold value can be 35% of the battery capacity.
[0264] Step 305, increasing the initial charging parameter to a first charging parameter, in a case where the electronic device charges the electronic device according to the initial charging parameter.
[0265] Step 306, charging the electronic device according to the first charging parameter.
[0266] Step 307, determining whether the remaining power of the electronic device is less than a third threshold value.
[0267] wherein if the remaining power is less than the third threshold value, step 306 is continued, otherwise, step 308 is performed;
[0268] wherein the third threshold value can be 60% of the battery capacity.
[0269] Step 308, stopping charging according to the first charging parameter or the second charging parameter.
[0270] Step 309, charging according to the initial charging parameter.
[0271] Step 310, determining whether the remaining power of the electronic device is less than a second threshold value;
[0272] If the remaining power of the electronic device is less than the second threshold value, step 310 is performed, otherwise, step 308 is performed.
[0273] The second threshold value can be 20% of the battery capacity.
[0274] Step 311, in the case that the electronic device is charged according to the initial charging parameter, the initial charging parameter is increased to a second charging parameter.
[0275] Step 312, charging the electronic device according to the second charging parameter.
[0276] Step 313, determining whether the remaining power of the electronic device is less than a fourth threshold value;
[0277] The fourth threshold value can be 40% of the battery capacity.
[0278] If the remaining power is less than the fourth threshold value, step 312 is continued, otherwise, step 308 is performed.
[0279] Step 314, completing the charging.
[0280] In the embodiments of the present disclosure, when the electronic device is in a placed state, the electronic device can be in a use state or an idle state. When the electronic device is in an idle state, the charging speed of the electronic device is fast, so only simple charging acceleration is needed when the remaining power is less than the second threshold value. At this time, the user's power consumption demand for using the electronic device without charging can be met. For example, when the user needs to go out in an emergency, the charging speed of the electronic device can be improved through charging acceleration, so that the remaining power of the electronic device is quickly increased to the power that can support the user to use for a long time outdoors. When the electronic device is in a use state, the electronic device is charging while consuming power, at this time, the charging speed is slow, and even the power of the electronic device can continue to decrease. Therefore, charging acceleration needs to be performed in advance when the remaining power of the electronic device is high, so that the user's demand can be met.
[0281] Figure 5 is a charging device according to an embodiment of the present disclosure, which comprises:
[0282] The determining module 51 is configured to determine whether the electronic device is in a placed state based on the sensor data collected by the inertial sensor in the electronic device.
[0283] The charging module 52 is configured to determine a charging strategy corresponding to the operating parameter of the electronic device when the electronic device is in a placed state, and charge the electronic device based on the charging strategy.
[0284] wherein different running parameters correspond to different charging strategies.
[0285] In an embodiment, the determining module 51 is configured to:
[0286] determine, based on a running parameter of the electronic device, whether the electronic device is in a use state in a case that the electronic device is in a placed state;
[0287] the charging module 52 is configured to: adjust an initial charging parameter of the electronic device and charge the electronic device based on the adjusted first charging parameter in a case that the electronic device is in the use state and the remaining power of the electronic device is less than a first threshold value; or,
[0288] adjust an initial charging parameter of the electronic device and charge the electronic device based on the adjusted second charging parameter in a case that the electronic device is in the idle state and the remaining power of the electronic device is less than a second threshold value;
[0289] wherein the first threshold value is greater than the second threshold value.
[0290] In an embodiment, the charging module 52 is configured to:
[0291] if the remaining power of the electronic device is greater than a third threshold value in a case that the electronic device is in the use state, restore the first charging parameter of the electronic device to the initial charging parameter; or,
[0292] if the remaining power of the electronic device is greater than a fourth threshold value in a case that the electronic device is in the idle state, restore the second charging parameter of the electronic device to the initial charging parameter.
[0293] wherein the third threshold value is greater than the fourth threshold value.
[0294] In an embodiment, the charging module 52 is configured to include:
[0295] determine the first threshold value based on the use state in a case that the electronic device is in the use state; wherein the electronic device generates different power consumptions in different use states, and the first threshold value is positively correlated with the power consumptions;
[0296] adjust the initial charging parameter of the electronic device based on the use state in a case that the remaining power of the electronic device is less than the first threshold value.
[0297] In an embodiment, the charging module 52 is configured to include:
[0298] determine an adjustment value corresponding to the use state based on the power consumption generated by the electronic device in the use state in a case that the remaining power is less than the first threshold value; wherein the adjustment value is positively correlated with the power consumption;
[0299] increase the charging parameter of the electronic device based on the adjustment value, to obtain a first charging parameter.
[0300] In one embodiment, the charging module 52 is configured to:
[0301] In a case where the electronic device is in the idle state and the remaining power of the electronic device is less than a second threshold value, increase the initial charging parameter of the electronic device based on a preset adjustment value, to obtain a second charging parameter.
[0302] In one embodiment, the determining module 51 is configured to:
[0303] In a case where the electronic device is in the placed state, determine whether the electronic device is in a target posture based on the sensing data;
[0304] In a case where the electronic device is in the target posture, determine whether the electronic device is in the use state based on the running parameter of the electronic device.
[0305] In one embodiment, the determining module 51 is configured to:
[0306] Determine an inclination angle of the electronic device relative to a horizontal direction based on the sensing data;
[0307] If the inclination angle is greater than a preset angle threshold value, determine that the electronic device is in the target posture;
[0308] If the inclination angle is less than or equal to the angle threshold value, determine that the electronic device is not in the target posture.
[0309] In one embodiment, the charging module 52 is configured to:
[0310] In a case where the electronic device is in the placed state and the electronic device is not in the target posture, if the remaining power of the electronic device is less than the second threshold value, adjust the initial charging parameter of the electronic device, and charge the electronic device according to the second charging parameter obtained by the adjustment.
[0311] In one embodiment, the charging module 52 is configured to:
[0312] In a case where the electronic device is in the placed state and the electronic device is not in the target posture, if the remaining power of the electronic device is greater than a fourth threshold value, restore the second charging parameter of the electronic device to the initial charging parameter.
[0313] In one embodiment, the determining module 51 is configured to:
[0314] Determine, based on the sensing data, whether a duration in which the electronic device is in the stationary state is greater than a preset duration;
[0315] If the duration is greater than the preset duration, it is determined that the electronic device is in the placement state.
[0316] Referring to Figure 6 The device 600 can include one or more of the following components: a processing component 602, a memory 604, a power supply component 606, a multimedia component 608, an audio component 610, an input / output (I / O) interface 612, a sensor component 614, and a communication component 616.
[0317] The processing component 602 usually controls overall operations of the device 600, such as operations associated with display, telephone call, data communication, camera operation and recording operation. The processing component 602 can include one or more processors 620 to execute instructions to complete all or part of steps of the methods described above. In addition, the processing component 602 can include one or more modules to facilitate the interaction between the processing component 602 and other components. For example, the processing component 602 can include a multimedia module to facilitate the interaction between the multimedia component 608 and the processing component 602.
[0318] The memory 604 is configured to store various types of data to support operations of the device 600. Examples of these data include at least one of the following: instructions for any application or method operating on the device 600, contact data, phonebook data, messages, pictures, and videos. The memory 604 can be implemented by any type of volatile or non-volatile storage devices 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 storage, flash memory, magnetic disk or optical disk.
[0319] The power supply component 606 provides power for various components of the device 600. The power supply component 606 can include at least one of the following: a power supply management system, one or more power supplies, and other components associated with generating, managing and distributing power for the device 600.
[0320] The multimedia component 608 includes a screen providing an output interface between the device 600 and a user. In one embodiment, the screen includes a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, swiping, and gestures on the touch panel. The touch sensors can not only sense a boundary of a touching or swiping action, but also detect duration and pressure related to the touching or swiping action. In one embodiment, the multimedia component 608 includes a front camera and / or a rear camera. When the device 600 is in an operation mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have a focal length and optical zooming capability.
[0321] The audio component 610 is configured to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC) to receive an external audio signal when the device 600 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 604 or transmitted via the communication component 616. In one embodiment, the audio component 610 further includes a speaker for outputting audio signals.
[0322] The I / O interface 612 provides an interface between the processing component 602 and peripheral interface modules, such as a keyboard, a click wheel, and buttons. The buttons can include, but are not limited to, a home button, a volume button, a start button, and a lock button.
[0323] The sensor component 614 includes one or more sensors for providing status assessments for various aspects of the device 600. For example, the sensor component 614 can detect an open / closed position of the device 600, relative positioning of components, such as a display and keypad of the device 600, changes in position of the device 600 or a component of the device 600, presence or absence of user contact with the device 600, orientation or acceleration / deceleration of the device 600, and temperature changes of the device 600. The sensor component 614 can include proximity sensor(s) configured to detect presence of a proximity object without any physical contact. The sensor component 614 can further include an optical sensor, such as a complementary metal-oxide semiconductor (CMOS) or charge coupled device (CCD) image sensor, utilized in imaging applications. In one embodiment, the sensor component 614 can further include at least one of an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, and a temperature sensor, among others.
[0324] The communication component 616 is configured to facilitate wired or wireless communication between the device 600 and another device. The device 600 can access a wireless network based on a communication standard, such as Wi-Fi, 4G, 5G, or a combination thereof. In an example embodiment, the communication component 616 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In an example embodiment, the communication component 616 can further include 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) techniques, Infrared Data Association (IrDA) techniques, Ultra-WideBand (UWB) techniques, Bluetooth (BT) techniques, and other techniques.
[0325] In exemplary embodiments, the apparatus 600 can 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, micro-controllers, microprocessors, or other electronic elements.
[0326] In exemplary embodiments, a non-transitory computer-readable storage medium including instructions, such as a memory 604 including executable instructions or a computer program, is also provided, which can be executed by the processor 620 of the apparatus 600 to complete the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a Random Access Memory (RAM), a Compact Disc Read-Only Memory (CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0327] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to perform any of the charging methods of the embodiments of the present disclosure. For example, the charging method includes:
[0328] Based on sensor data collected by an inertial sensor in the electronic device, it is determined whether the electronic device is in a placed state;
[0329] In the case where the electronic device is in the placed state, a charging strategy corresponding to an operating parameter of the electronic device is determined, and the electronic device is charged based on the charging strategy;
[0330] Wherein the charging strategies corresponding to different operating parameters are different.
[0331] The embodiments of the present disclosure provide a computer program product, which includes a computer program or executable instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer program or executable instructions from the computer-readable storage medium, and the processor executes the computer program or executable instructions, so that the computer device executes any of the charging methods of the embodiments of the present disclosure.
[0332] Figure 7 is a block diagram of an apparatus 700 for displaying according to an example embodiment. For example, the apparatus 700 can be provided as a server. Referring to FIG. 7A, the apparatus 700 includes a processing component 722, which is further configured to include one or more processors, and a memory resource represented by a memory 732 for storing instructions, such as an application program, executable by the processing component 722. The application program stored in the memory 732 can include one or more than one module each corresponding to a set of instructions. In addition, the processing component 722 is configured to execute the instructions to perform the charging method described above: Figure 7 determine, based on sensor data collected by an inertial sensor within the electronic device, whether the electronic device is in a resting state;
[0333]
[0334] in a case where the electronic device is in the resting state, determine a charging strategy corresponding to an operating parameter of the electronic device, and charge the electronic device based on the charging strategy;
[0335] wherein the charging strategies corresponding to different operating parameters are different.
[0336] The apparatus 700 can further include a power component 726 configured to perform power management of the apparatus 700, a wired or wireless network interface 750 configured to connect the apparatus 700 to a network, and an input / output (I / O) interface 758. The apparatus 700 can operate an operating system stored in the memory 732, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or the like.
[0337] Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the features disclosed herein. It is intended that the specification and examples be considered as exemplary only, with the true scope and spirit of the disclosure being indicated by the following claims.
[0338] It should be understood that the present disclosure is not limited to the precise structures herein described and illustrated, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the claims that follow.
Claims
1. A charging method characterized by, The method comprises: determining, based on sensing data collected by an inertial sensor in an electronic device, whether the electronic device is in a placed state; in a case where the electronic device is in the placed state, determining a charging strategy corresponding to an operating parameter of the electronic device, and charging the electronic device based on the charging strategy; wherein the charging strategy corresponding to different operating parameters is different.
2. The charging method according to claim 1, characterized by, The method further comprises: in a case where the electronic device is in the placed state, determining, based on the operating parameter of the electronic device, whether the electronic device is in a use state; in a case where the electronic device is in the use state and the remaining power of the electronic device is less than a first threshold, adjusting an initial charging parameter of the electronic device, and charging the electronic device based on the first charging parameter obtained by the adjustment; or in a case where the electronic device is in an idle state and the remaining power of the electronic device is less than a second threshold, adjusting an initial charging parameter of the electronic device, and charging the electronic device based on the second charging parameter obtained by the adjustment; wherein the first threshold is greater than the second threshold.
3. The charging method according to claim 2, characterized by, The method further comprises: in a case where the electronic device is in the use state, if the remaining power of the electronic device is greater than a third threshold, restoring the first charging parameter of the electronic device to an initial charging parameter; or in a case where the electronic device is in the idle state, if the remaining power of the electronic device is greater than a fourth threshold, restoring the second charging parameter of the electronic device to an initial charging parameter; wherein the third threshold is greater than the fourth threshold.
4. The charging method according to claim 2, characterized by, The method further comprises: in a case where the electronic device is in the use state, determining the first threshold based on the use state; wherein the power consumption of the electronic device in different use states is different, and the first threshold is positively correlated with the power consumption; in a case where the remaining power of the electronic device is less than the first threshold, adjusting the initial charging parameter of the electronic device based on the use state.
5. The charging method according to claim 4, characterized by, The method further comprises: in a case where the remaining power is less than the first threshold, determining an adjustment value corresponding to the use state based on the power consumption of the electronic device in the use state; wherein the adjustment value is positively correlated with the power consumption; increasing the initial charging parameter of the electronic device based on the adjustment value to obtain the first charging parameter.
6. The charging method according to claim 2, characterized by, The method further comprises: in a case where the electronic device is in the idle state and the remaining power is less than the second threshold, adjusting the initial charging parameter of the electronic device based on the use state. When the electronic device is in an idle state and the remaining power of the electronic device is less than the second threshold, the initial charging parameters of the electronic device are increased based on a preset adjustment value to obtain the second charging parameters.
7. The charging method according to claim 2, characterized by, When the electronic device is in a placed state, determining whether the electronic device is in a used state based on the operating parameters of the electronic device includes: When the electronic device is in a placed state, it is determined whether the electronic device is in a target posture based on the sensing data; When the electronic device is in the target posture, it is determined whether the electronic device is in use based on its operating parameters.
8. The charging method according to claim 7, characterized by, Determining whether the electronic device is in the target posture based on the sensing data includes: determining the tilt angle of the electronic device relative to the horizontal direction based on the sensing data; If the tilt angle is greater than a preset angle threshold, then the electronic device is determined to be in the target posture; If the tilt angle is less than or equal to the angle threshold, then the electronic device is determined not to be in the target posture.
9. The charging method according to claim 7, characterized by, The method further includes: When the electronic device is in the placement state and not in the target posture, if the remaining power of the electronic device is less than the second threshold, the initial charging parameters of the electronic device are adjusted, and the electronic device is charged according to the adjusted second charging parameters.
10. The charging method according to claim 9, characterized by, The method further includes: When the electronic device is in the placement state and not in the target posture, if the remaining power of the electronic device is greater than the fourth threshold, the second charging parameters of the electronic device are restored to the initial charging parameters.
11. The charging method according to any one of claims 1 to 10, characterized in that, Determining whether the electronic device is in a placement state based on sensing data collected by inertial sensors within the electronic device includes: Based on the sensor data, determine whether the duration of the electronic device being in a static state is greater than a preset duration; If the duration exceeds the preset duration, the electronic device is determined to be in the placement state.
12. A charging device, characterized by The device includes: The determination module is configured to determine whether the electronic device is in a placement state based on sensing data collected by the inertial sensors inside the electronic device. The charging module is configured to determine a charging strategy corresponding to the operating parameters of the electronic device when the electronic device is in a placed state, and to charge the electronic device based on the charging strategy. Different operating parameters correspond to different charging strategies.
13. An electronic device, comprising: include: processor; Memory used to store computer programs or instructions; The processor executes the computer program or instructions to implement the steps of the method according to any one of claims 1 to 11.
14. A non-transitory computer-readable storage medium storing a computer program or instructions, wherein, When the computer program or instructions in the storage medium are executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.
15. A computer program product comprising computer programs or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 11.