Charging method and device, electronic equipment, storage medium and computer program product
By acquiring the location and battery level changes of the terminal device, the usage scenario is determined and the charging mode is switched accordingly. This solves the problem of insufficient charging speed of the terminal device in outdoor scenarios, and realizes a more efficient charging strategy and user experience.
Patent Information
- Application Number
- CN202410534069.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-29
- Publication Date
- 2025-10-31
AI Technical Summary
In existing technologies, terminal devices cannot accurately identify usage scenarios in real time, resulting in charging strategies that do not meet user needs, especially in outdoor scenarios where charging speed is insufficient.
By acquiring the third position corresponding to different battery levels during the process of the terminal device moving from the first position to the second position, and combining the position and battery information, the current usage scenario is determined, and the charging mode, such as fast charging mode, is switched according to the scenario to improve the charging speed.
It enables accurate identification of terminal devices in different usage scenarios, improves the adaptability of charging strategies and user experience, and especially improves charging speed in outdoor scenarios.
Smart Images

Figure CN120879828A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of charging, and more particularly to a charging method, apparatus, electronic device, storage medium, and computer program product. Background Technology
[0002] In existing technologies, the charging speed of terminal devices is fixed, but the user's usage scenarios change. For example, there may be outdoor scenarios such as walking or hiking. If the terminal device's battery is low in these scenarios, the user urgently needs to charge it. In this case, if the terminal device is charged according to a fixed charging mode, it cannot meet the user's power needs. Therefore, it is necessary to identify the current usage scenario of the terminal device so that users can formulate different charging strategies according to different usage scenarios.
[0003] In related technologies, the identification of the usage scenario of a terminal device is based on the previously saved wireless network connection information. However, outdoor wireless networks have security issues, and terminal devices can also be used without a wireless network connection. Therefore, the terminal device cannot identify the current usage scenario in real time, leading to a decrease in the accuracy of the identification. If the saved wireless network information is updated, the terminal device cannot obtain the updated information in time, which can cause misjudgments in the identification of the current usage scenario. Summary of the Invention
[0004] To overcome the problems existing in related technologies, this disclosure provides a charging method, device, electronic device, storage medium, and computer program product that can identify the current usage scenario of the terminal device in real time, thereby improving the accuracy of identifying the current usage scenario of the terminal device.
[0005] According to a first aspect of the present disclosure, a charging method is provided, including...
[0006] The system acquires a first position when the terminal device finishes charging and a second position of the terminal device; it acquires a third position corresponding to different battery levels as the terminal device moves from the first position to the second position; wherein the third position is the position the terminal device passes through during the movement; it determines the current usage scenario of the terminal device based on the first position, the second position, and each of the third positions; and it charges the terminal device according to the current usage scenario.
[0007] In some embodiments, obtaining the third position corresponding to different battery levels during the process of the terminal device moving from the first position to the second position includes: obtaining the battery level drop of the terminal device in real time during the process of the terminal device moving from the first position to the second position; wherein the battery level drop is the power consumption value of the terminal device; and determining the position where the battery level drop reaches a preset battery level drop as the third position; wherein each time the battery level drop reaches the preset battery level drop, a third position is determined.
[0008] In some embodiments, determining the current usage scenario of the terminal device based on the first location, the second location, and each of the third locations includes at least one of the following: determining a first relative distance between each of the third locations and the first location, and a first relative distance between the second location and the first location, and determining the current usage scenario of the terminal device based on the first relative distance; determining a second relative distance between each of the third locations, and determining the current usage scenario of the terminal device based on the second relative distance; determining a third relative distance between two adjacent locations among the first location, the second location, and each of the third locations, and determining the current usage scenario of the terminal device based on the third relative distance; wherein the relative distance includes: straight-line distance.
[0009] In some embodiments, determining the current usage scenario of the terminal device based on the first relative distance includes: determining a first target distance from all the first relative distances; wherein the first target distance is the maximum value among all the first relative distances; and determining that the terminal device is currently in an outdoor scenario when the first target distance is greater than a preset first distance threshold.
[0010] In some embodiments, determining the current usage scenario of the terminal device based on the second relative distance includes: determining the current usage scenario of the terminal device based on the second relative distance when the first target distance is less than or equal to the first distance threshold.
[0011] In some embodiments, determining the current usage scenario of the terminal device based on the second relative distance includes: determining a second target distance from all the second relative distances; wherein the second target distance is the maximum value among all the second relative distances; and determining that the terminal device is currently in an outdoor scenario when the second target distance is greater than a preset second distance threshold.
[0012] In some embodiments, determining the current usage scenario of the terminal device based on the third relative distance includes: determining the current usage scenario of the terminal device based on the third relative distance when the second target distance is less than or equal to the second distance threshold.
[0013] In some embodiments, determining the current usage scenario of the terminal device based on the third relative distance includes: determining a third target distance based on the sum of the third relative distances; determining that the terminal device is currently in an outdoor scenario when the third target distance is greater than a preset third distance threshold; and determining that the terminal device is currently in a non-outdoor scenario when the third target distance is less than or equal to the third distance threshold.
[0014] In some embodiments, obtaining the third position corresponding to different battery levels during the process of the terminal device moving from the first position to the second position includes: obtaining the third position corresponding to different battery levels during the process of the terminal device moving from the first position to the second position when the difference between the battery level at the first position and the battery level at the second position is greater than a preset battery level difference; the method further includes: determining that the terminal device does not perform current usage scenario identification when the difference between the battery level at the first position and the battery level at the second position is less than or equal to the preset battery level difference.
[0015] In some embodiments, the method further includes: when it is determined that the terminal device is currently in an outdoor scene, switching the terminal device to a fast charging mode; and when the mobile terminal is being charged in the fast charging mode, if the power level of the mobile terminal reaches a preset power threshold, exiting the fast charging mode.
[0016] In some embodiments, the step of switching the terminal device to fast charging mode when it is determined that the terminal device is currently in an outdoor scene includes: determining the remaining battery power of the terminal device when it is in the second position; and switching the terminal device to fast charging mode when the remaining battery power of the terminal device when it is in the second position is less than a preset threshold.
[0017] In some embodiments, switching the terminal device to fast charging mode when it is determined that the terminal device is currently in the outdoor scene includes: determining the charging type for charging the terminal device when it is determined that the terminal device is currently in the outdoor scene; and switching the terminal device to the corresponding fast charging mode based on the charging type; wherein the charging parameters of the fast charging mode corresponding to different charging types are different.
[0018] In some embodiments, switching the terminal device to the corresponding fast charging mode based on the charging type includes: switching the terminal device to a first fast charging mode when the charging type is power bank charging; and switching the terminal device to a second fast charging mode when the charging type is fixed power supply charging; wherein, in the first fast charging mode, the charging current for charging the terminal device is increased; and in the second fast charging mode, the upper limit of the temperature control module is increased.
[0019] According to a second aspect of the present disclosure, a charging device is provided, comprising: a first acquisition unit configured to acquire a first position of a terminal device when charging ends and a current second position of the terminal device; a second acquisition unit configured to acquire third positions corresponding to different battery levels during the process of the terminal device moving from the first position to the second position; wherein the third positions are positions traversed by the terminal device during the movement; a determination unit configured to determine a current usage scenario of the terminal device based on the first position, the second position, and each of the third positions; and a charging unit configured to charge the terminal device according to the current usage scenario.
[0020] In some embodiments, the second acquisition unit includes:
[0021] The first acquisition subunit is configured to acquire the power loss of the terminal device in real time during the process of the terminal device moving from the first position to the second position; wherein the power loss is the power consumption value of the terminal device;
[0022] The subunit is configured to determine the third position when the power loss of the terminal device reaches the preset power loss position; wherein, each time the power loss reaches the preset power loss position, a third position is determined.
[0023] In some embodiments, the determining unit is specifically configured to be at least one of the following:
[0024] Determine the first relative distance between each of the third locations and the first location, and the first relative distance between the second location and the first location, and determine the current usage scenario of the terminal device based on the first relative distance;
[0025] Determine the second relative distance between each of the third locations, and determine the current usage scenario of the terminal device based on the second relative distance;
[0026] The third relative distance between two adjacent positions in the first position, the second position, and each of the third positions is determined respectively, and the current usage scenario of the terminal device is determined based on the third relative distance;
[0027] The relative distance includes: straight-line distance.
[0028] In some embodiments, determining the current usage scenario of the terminal device based on the first relative distance includes:
[0029] A first target distance is determined from all the first relative distances; wherein the first target distance is the maximum value among all the first relative distances;
[0030] If the distance to the first target is greater than a preset first distance threshold, it is determined that the terminal device is currently in an outdoor scene.
[0031] In some embodiments, determining the current usage scenario of the terminal device based on the second relative distance includes:
[0032] If the first target distance is less than or equal to the first distance threshold, the current usage scenario of the terminal device is determined based on the second relative distance.
[0033] In some embodiments, determining the current usage scenario of the terminal device based on the second relative distance includes:
[0034] Determine the second target distance from all the second relative distances; wherein the second target distance is the maximum value among all the second relative distances;
[0035] If the distance to the second target is greater than a preset second distance threshold, it is determined that the terminal device is currently in an outdoor scene.
[0036] In some embodiments, determining the current usage scenario of the terminal device based on the third relative distance includes:
[0037] If the second target distance is less than or equal to the second distance threshold, the current usage scenario of the terminal device is determined based on the third relative distance.
[0038] In some embodiments, determining the current usage scenario of the terminal device based on the third relative distance includes:
[0039] The third target distance is determined based on the sum of the values of the third relative distances.
[0040] If the distance to the third target is greater than a preset third distance threshold, it is determined that the terminal device is currently in an outdoor scene;
[0041] If the distance to the third target is less than or equal to the third distance threshold, it is determined that the terminal device is currently in a non-outdoor scene.
[0042] In some embodiments, the second acquisition unit includes:
[0043] The second acquisition subunit is configured to acquire the third position corresponding to different battery levels during the process of the terminal device moving from the first position to the second position when the difference between the battery level at the first position and the battery level at the second position is greater than a preset battery level difference.
[0044] The device further includes:
[0045] The second determining unit is configured to determine that the terminal device will not identify the current usage scenario if the difference between the battery level at the first location and the battery level at the second location is less than or equal to the preset battery level difference.
[0046] In some embodiments, the apparatus further includes:
[0047] The switching unit is configured to switch the terminal device to fast charging mode when it is determined that the terminal device is currently in an outdoor scene;
[0048] The control unit is configured to exit the fast charging mode if the mobile terminal's battery level reaches a preset battery threshold when the mobile terminal is being charged in the fast charging mode.
[0049] In some embodiments, the switching unit includes:
[0050] The third determining subunit is configured to determine the remaining battery power of the terminal device when it is in the second location, provided that the terminal device is currently in the outdoor scene.
[0051] The switching unit is further configured to switch the terminal device to the fast charging mode when the remaining power of the terminal device is less than a preset threshold when the terminal device is in the second position.
[0052] In some embodiments, the switching unit includes:
[0053] The fourth determining subunit is configured to determine the charging type for charging the terminal device when it is determined that the terminal device is currently in the outdoor scene;
[0054] The switching unit is also configured to switch the terminal device to the corresponding fast charging mode based on the charging type;
[0055] The charging parameters for fast charging modes vary depending on the charging type.
[0056] In some embodiments, the switching unit includes:
[0057] The first switching subunit is configured to switch the terminal device to a first fast charging mode when the charging type is power bank charging.
[0058] The first switching subunit is further configured to switch the terminal device to a second fast charging mode when the charging type is fixed power supply charging;
[0059] In the first fast charging mode, the charging current for charging the terminal device is increased; in the second fast charging mode, the upper limit of the temperature control module is increased.
[0060] According to a third aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing computer programs or instructions; wherein the processor executes the computer programs or instructions to implement the steps of the method described in any of the preceding embodiments.
[0061] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, the storage medium storing a computer program or instructions that, when executed by a processor, implement the steps of the method described in any of the preceding embodiments.
[0062] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program or instructions that, when executed by a processor, implement the steps of the method described in any of the above embodiments.
[0063] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:
[0064] In this embodiment of the disclosure, by acquiring the third positions corresponding to different battery levels during the process of the terminal device moving from the first position to the second position, the movement trajectory of the terminal device during the process of moving from the first position to the second position can be determined. Since each third position corresponds to a different battery level, the movement trajectory of the terminal device from the first position through each third position to the second position and the positions corresponding to different battery levels can be determined through the first position, the second position, and each third position. Furthermore, the current usage scenario of the terminal device can be determined through the positions corresponding to different battery levels.
[0065] By associating location with battery level, the current usage scenario of the terminal device can be identified in real time. Compared with scene identification triggered by user operation, this disclosure can improve the accuracy of the terminal device in identifying the usage scenario and enhance the user experience.
[0066] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0067] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0068] Figure 1 This is a flowchart illustrating a charging method according to an exemplary embodiment.
[0069] Figure 2 This is a distribution diagram of a first position, a second position, and various third positions, according to an exemplary embodiment.
[0070] Figure 3 This is a flowchart illustrating a charging method according to an exemplary embodiment.
[0071] Figure 4 This is a flowchart illustrating a charging method according to an exemplary embodiment.
[0072] Figure 5 This is a block diagram illustrating a charging device according to an exemplary embodiment.
[0073] Figure 6 This is a block diagram illustrating a charging device according to an exemplary embodiment. Detailed Implementation
[0074] 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.
[0075] Figure 1 This is a flowchart illustrating a charging method according to an exemplary embodiment. Figure 1 As shown, this charging method is used in terminal devices, and the method mainly includes the following steps:
[0076] In step 101, the first position of the terminal device when charging ends and the current second position of the terminal device are obtained.
[0077] In step 102, the third position corresponding to different battery levels is obtained during the process of the terminal device moving from the first position to the second position; wherein, the third position is the position traversed by the terminal device during the movement.
[0078] In step 103, the current usage scenario of the terminal device is determined based on the first position, the second position, and each of the third positions.
[0079] In step 104, the terminal device is charged according to the current usage scenario.
[0080] It should be noted that the charging method proposed in this disclosure can be applied to electronic devices. Here, electronic devices may include terminal devices, such as mobile terminals or fixed terminals. Mobile terminals may include mobile phones, tablets, laptops, wearable electronic devices, and power banks. Fixed terminals may include desktop computers, smart TVs, and in-vehicle systems. In some other embodiments, the charging method can also be applied to applications installed on the electronic device.
[0081] In this embodiment of the disclosure, the terminal device includes, but is not limited to, rechargeable electronic devices such as mobile phones, tablets, headphones, watches, computer equipment, and vehicle-mounted equipment.
[0082] It should be noted that the first, second, and third locations can be obtained from the positioning system of the terminal device. The positioning system can be a system built into the terminal device; for example, the terminal device can perform positioning based on satellites, or it can perform positioning based on base stations of a mobile network operator. This disclosure does not limit this approach.
[0083] Because the battery level of a terminal device changes with its usage status and / or usage time after charging ends, for example, it gradually decreases. In this embodiment of the disclosure, the battery level of the terminal device changes as it moves from a first position to a second position. This can be understood as the battery level differing depending on the location the terminal device moves to. In this embodiment of the disclosure, the terminal device's first position is obtained when charging ends, and its second position is obtained when charging needs to be resumed. During the movement of the terminal device from the first position to the second position, one or more third positions corresponding to different battery levels are obtained. In some embodiments, the third position can be directly determined based on the different battery levels.
[0084] For example, during the process of moving from a first position to a second position, the terminal device can determine a third position between the first and second positions based on different battery levels. For instance, when the battery level of the terminal device decreases from 88% when it is in the first position to 48% when it is in the second position, the third position of the terminal device is determined to be 68% battery level.
[0085] As another example, during the process of the terminal device moving from the first position to the second position, it can obtain multiple third positions between the first and second positions based on different battery levels. For example, the battery level of the terminal device decreases from 100% when it is in the first position to 68% when it is in the second position. When the battery level of the terminal device decreases to 98%, the third position of the terminal device at 98% battery level can be determined; when the battery level of the terminal device decreases to 88%, the third position of the terminal device at 88% battery level can be determined; when the battery level of the terminal device decreases to 78%, the third position of the terminal device at 78% battery level can be determined.
[0086] In other embodiments, the third position may also be determined based on different amounts of electricity corresponding to the first preset time interval.
[0087] For example, the first preset time interval is one hour. When the terminal device is in the first position, the battery level is 88%. After one hour, the terminal device obtains the battery level of the terminal device and it is found to be 76%. The position when the battery level is 76% is determined to be a third position. After another one hour, the terminal device obtains the battery level of the terminal device and it is found to be 62%. The position when the battery level is 62% is determined to be a third position.
[0088] In other embodiments, the third position can also be determined based on different preset remaining battery levels. For example, the preset remaining battery level can be set to 70%, 60%, 50%, 40%, and 30%. When the remaining battery level of the terminal device is 70%, a third position is determined; when the remaining battery level of the terminal device is 60%, a third position is determined, until the remaining battery level reaches the level at the second position.
[0089] The current usage scenarios for terminal devices include both outdoor and non-outdoor scenarios. Outdoor scenarios include activities like outdoor walking and outdoor sports. Non-outdoor scenarios include indoor scenarios, and indoor scenarios include indoor entertainment.
[0090] Based on the first position, the second position, and each of the third positions, the current usage scenario of the terminal device is determined, including: determining the movement trajectory of the terminal device based on the first position, the second position, and each of the third positions, and determining the current usage scenario of the terminal device based on the movement trajectory. For example, the length of the total movement trajectory of the terminal device from the first position through each of the third positions to the second position is determined, and the current usage scenario of the terminal device is determined based on the length of the total movement trajectory. Another example is determining the relative movement trajectory of the terminal device between each position (including the first position, the second position, and the third position), and determining the current usage scenario of the terminal device based on the relative movement trajectory.
[0091] For example, a preset length threshold is established. When the total length of the movement trajectory exceeds the preset length threshold, the terminal device is determined to be in an outdoor scene. When the total length of the movement trajectory is less than or equal to the preset length threshold, the terminal device is determined to be in a non-outdoor scene. For example, the preset length threshold is 100 meters. When the total length of the movement trajectory from the first position through each of the third positions to the second position is 110 meters, the terminal device is determined to be in an outdoor scene. When the total length of the movement trajectory from the first position through each of the third positions to the second position is 50 meters, the terminal device is determined to be in a non-outdoor scene.
[0092] Determining the current usage scenario of the terminal device based on the first position, the second position, and each of the third positions also includes: determining the straight-line distance between the first position and the second position of the terminal device, and determining the current usage scenario of the terminal device based on the straight-line distance between the first position and the second position.
[0093] For example, a preset straight-line distance threshold is established. When the straight-line distance between the first and second locations is greater than the threshold, the terminal device is determined to be in an outdoor scene. When the straight-line distance between the first and second locations is less than or equal to the threshold, the terminal device is determined to be in a non-outdoor scene. For instance, if the preset straight-line distance threshold is set to 80 meters, when the straight-line distance between the first and second locations is greater than 80 meters, the terminal device is determined to be in an outdoor scene. When the straight-line distance between the first and second locations is less than or equal to 80 meters, the terminal device is determined to be in a non-outdoor mode.
[0094] In this embodiment of the disclosure, after determining the current usage scenario of the terminal device, the terminal device can be charged according to different current usage scenarios. In some embodiments, a mapping relationship between the current usage scenario of the terminal device and the charging strategy can be established in advance. After determining the current usage scenario of the terminal device, the terminal device can be charged based on the determined current usage scenario and the mapping relationship.
[0095] For example, the charging strategy includes a first charging strategy and a second charging strategy, wherein the charging rate corresponding to the first charging strategy is greater than the charging rate corresponding to the second charging strategy. When it is determined that the terminal device is in a non-outdoor scenario, the second charging strategy can be used to charge the terminal device. When it is determined that the terminal device is in an outdoor scenario, the first charging strategy is used to charge the terminal device.
[0096] For example, the first charging strategy corresponds to a fast charging mode, and the second charging strategy corresponds to a standard mode, etc. The fast charging mode has a higher charging rate than the standard mode. When the terminal device is determined to be in a non-outdoor environment, the standard mode is used to charge the terminal device. For example, when the terminal device is indoors, since there is sufficient power indoors, it can be charged at any time, and the user does not need to worry about the terminal device's power consumption; the standard mode can be used to charge the terminal device. When the terminal device is outdoors, due to the scarcity of power outdoors, charging the terminal device is more difficult; therefore, the fast charging mode is used to charge the terminal device.
[0097] In this embodiment of the disclosure, by associating location with battery level, the current usage scenario of the terminal device can be identified in real time. Compared with scene identification triggered by the user through other operations, this disclosure can improve the accuracy of the terminal device in identifying the usage scenario and enhance the user experience.
[0098] In some embodiments, obtaining the third position corresponding to different battery levels during the process of the terminal device moving from the first position to the second position includes:
[0099] During the process of the terminal device moving from the first position to the second position, the power loss of the terminal device is acquired in real time; whereby the power loss is the power consumption value of the terminal device.
[0100] The terminal device is designated as the third position when its power consumption reaches a preset level; a third position is designated each time the power consumption reaches the preset level.
[0101] It should be noted that battery drain refers to the amount of power consumed by the terminal device during use, representing the decrease in the device's battery level. For example, a 10% battery drain means that the terminal device's battery level decreased by 10% during use.
[0102] The preset power consumption can be set according to the power consumption of the terminal device. For example, the preset power consumption can be positively correlated with the power consumption rate of the terminal device. For instance, the faster the terminal device consumes power, the greater the preset power consumption.
[0103] In some embodiments, the power loss of the terminal device can be acquired at a second preset time interval, and a third position is acquired once when the acquired power loss reaches a preset power loss. For example, a third position is acquired once each time the terminal device's power value is consumed by 10%.
[0104] In other embodiments, the preset power loss can be one or multiple. Each time the power loss reaches the preset power loss, a third position is determined. Taking a preset power loss of one as an example, if the preset power loss is set to 10%, the terminal device's battery level is 85% at the first position. When the power loss reaches 10%, that is, the battery level drops to 75%, a third position is determined; when the power loss reaches 10% again, that is, the battery level drops to 65%, another third position is determined, until a second position is reached.
[0105] Taking multiple preset power loss values as an example, the first power loss is set to 20%, and the second power loss is set to 10%. When the terminal device loses power for the first time and the power loss is 20%, a third position is determined; when the terminal device loses power for the second time and the power loss is 10%, another third position is determined; when the terminal device loses power for the third time and the power loss is 20%, another third position is determined; when the terminal device loses power for the fourth time and the power loss is 10%, another third position is determined, until the second position is reached.
[0106] In this embodiment of the disclosure, by acquiring the power loss of the terminal device in real time, the power status of the terminal device can be determined in real time, and then each third location can be determined based on the power status of the terminal device, and then the movement route of the terminal device can be determined based on the third location, thereby improving the accuracy of the terminal device location detection.
[0107] In some embodiments, the current usage scenario of the terminal device is determined based on the first location, the second location, and various third locations, including at least one of the following:
[0108] Determine the first relative distance between each third location and the first location, and the first relative distance between the second location and the first location, and determine the current usage scenario of the terminal device based on the first relative distance;
[0109] Determine the second relative distance between each third location, and determine the current usage scenario of the terminal device based on the second relative distance;
[0110] The third relative distance between two adjacent positions in the first position, the second position, and each third position is determined, and the current usage scenario of the terminal device is determined based on the third relative distance.
[0111] Relative distance includes: straight-line distance.
[0112] It should be noted that relative distance represents the straight-line distance between any two locations. Relative distance can be determined based on latitude and longitude, or it can be determined based on Cartesian coordinates or polar coordinates. For example, relative distance can be determined based on preset coordinate axes. For instance, an origin can be preset, and the coordinates of the first, second, and various third locations can be determined. The relative distance between any two locations can then be determined based on these coordinates. Another example is to determine the coordinates of the first and second locations, calculate the difference between the x-coordinate of the first location and the x-coordinate of the second location, and the difference between the y-coordinate of the first location and the y-coordinate of the second location. The relative distance between the first and second locations can then be determined based on the squares of the differences in the x-coordinates and y-coordinates.
[0113] Here, the first relative distance is determined based on the relative distance between any one of the third positions and the first position, and between the second position and the first position.
[0114] For example, a coordinate axis with the origin is preset. Based on the preset coordinate axis, the coordinates of each third position, the coordinates of the first position, and the coordinates of the second position are determined. The relative distances between any two of the first, second, and third positions are determined based on the coordinates of the third positions, the first position, and the second position. A first relative distance is then determined based on the relative distances between any two of the first, second, and third positions. For instance, the relative distances between any two of the first, second, and third positions can be determined separately to obtain at least two relative distances. Then, the average of these at least two relative distances is determined, and this average is used as the first relative distance.
[0115] Determining the current usage scenario of the terminal device based on a first relative distance includes: determining that the terminal device is currently in a non-outdoor scenario when the first relative distance meets a preset distance threshold condition for a non-outdoor scenario. The condition that the first relative distance meets the preset distance threshold condition for a non-outdoor scenario may include: the first relative distance being greater than a preset first threshold.
[0116] For example, when the average relative distance between any two of the first position, the second position, and each of the third positions meets the preset distance threshold condition for non-outdoor scenes, it is determined that the terminal device is currently in a non-outdoor scene.
[0117] In this embodiment of the disclosure, the second relative distance can be determined based on the relative distance between each third position.
[0118] For example, a coordinate axis with the origin is preset. Based on the preset coordinate axis, the coordinates of each third position are determined. The relative distance between any two positions within each third position is determined based on their coordinates. Finally, a second relative distance is determined based on the relative distance between any two positions within each third position. For instance, the relative distance between any two positions within each third position can be determined to obtain at least two relative distances. Then, the average of these at least two relative distances is determined, and this average is used as the second relative distance.
[0119] Determining the current usage scenario of the terminal device based on the second relative distance includes: determining that the terminal device is currently in a non-outdoor scenario when the second relative distance meets a preset distance threshold condition for a non-outdoor scenario. The condition that the second relative distance meets the preset distance threshold condition for a non-outdoor scenario may include: the second relative distance being greater than a preset second threshold.
[0120] For example, when the average relative distance between any two of the third locations meets the preset distance threshold condition for non-outdoor scenes, it is determined that the terminal device is currently in a non-outdoor scene.
[0121] In this embodiment of the disclosure, the third relative distance is determined based on the relative distance between two adjacent positions in the first position, the second position, and each third position.
[0122] For example, a coordinate axis with a preset origin is used. Based on this preset coordinate axis, the coordinates of a first position, a second position, and each of the third positions are determined. The relative distance between any two adjacent positions among the first, second, and third positions is determined based on their coordinates. A third relative distance is then determined based on the relative distance between any two adjacent positions among the first, second, and third positions. For instance, the relative distances between any two adjacent positions among the first, second, and third positions can be determined to obtain at least two relative distances. Then, the average of these at least two relative distances is determined, and this average is used as the third relative distance.
[0123] Determining the current usage scenario of the terminal device based on a third relative distance includes: determining that the terminal device is currently in a non-outdoor scenario when the third relative distance meets a preset distance threshold condition for a non-outdoor scenario. The condition that the third relative distance meets the preset distance threshold condition for a non-outdoor scenario may include: the third relative distance being greater than a preset third threshold.
[0124] For example, when the average relative distance between any two adjacent positions in the first position, the second position, and each of the third positions meets the preset distance threshold condition for non-outdoor scenes, it is determined that the terminal device is currently in a non-outdoor scene.
[0125] In this embodiment, the current usage scenario of the terminal device is determined based on the relative distance between the first position, the second position, and each of the third positions. By only detecting the position information of the first position, the second position, and each of the third positions, the power consumption of the terminal device can be saved, thereby saving the terminal device's power and improving the user experience.
[0126] In some embodiments, determining the current usage scenario of the terminal device based on a first relative distance includes:
[0127] Determine the first target distance from all first relative distances; wherein the first target distance is the maximum value among all first relative distances;
[0128] If the distance to the first target is greater than a preset first distance threshold, it is determined that the terminal device is currently in an outdoor scene.
[0129] In this embodiment of the disclosure, the maximum value among the first relative distances determined based on the first position, the second position, and each of the third positions is determined as the first target distance. The first target distance is used to represent the distance that is the farthest from the first position among the third positions and the second position.
[0130] For example, the first relative distance includes 50 meters, 80 meters and 100 meters, and the first target distance is determined to be 100 meters.
[0131] The first distance threshold is determined based on the distance between the terminal device and the outdoor scene. If the distance from the third position and the second position to the first position that is the farthest in a straight line is greater than the preset first distance threshold, it means that the terminal device is more than the preset distance from the initial position, and at this time it is determined that the terminal device is currently in an outdoor scene.
[0132] For example, a first distance threshold is set to 100 meters. When the first target distance determined from all first relative distances is greater than 100 meters, it is determined that the terminal device is currently in an outdoor scene.
[0133] In this embodiment of the disclosure, it is simpler to determine whether the terminal device is currently in an outdoor scene based on the first target distance, and at the same time improves the accuracy of the terminal device's outdoor scene detection.
[0134] In some embodiments, determining the current usage scenario of the terminal device based on a second relative distance includes:
[0135] If the distance to the first target is less than or equal to the first distance threshold, the current usage scenario of the terminal device is determined based on the second relative distance.
[0136] It should be noted that "the first target distance is less than or equal to the first distance threshold" means that the furthest straight-line distance from the first position among the various third and second positions is less than or equal to the first distance threshold. If the terminal device is currently used in an outdoor scenario, but it moves around the first position within the range of the first distance threshold, the judgment result based on the first target distance would indicate that the terminal device is in a non-outdoor scenario, which would result in a misjudgment. Therefore, it is necessary to determine the current usage scenario of the terminal device based on the second relative distance.
[0137] In this embodiment of the disclosure, when it is determined that the first relative distance is less than or equal to the first distance threshold, it is not directly determined that the terminal device is currently in a non-outdoor scene. Instead, the current usage scene of the terminal device is further determined based on the second relative distance. Through multiple determinations, the accuracy of the determined usage scene can be improved.
[0138] In some embodiments, determining the current usage scenario of the terminal device based on a second relative distance includes:
[0139] The second target distance is determined from all second relative distances; wherein the second target distance is the maximum value among all second relative distances, and if the second target distance is greater than a preset second distance threshold, it is determined that the terminal device is currently in an outdoor scene.
[0140] In this embodiment, the maximum value of the relative distances between the third positions is determined as the second target distance, which represents the farthest distance between any two third positions. If the farthest straight-line distance between the third positions is greater than a preset second distance threshold, it indicates that the distance between two third positions of the terminal device exceeds the preset distance, meaning that the terminal device has traveled a considerable distance during its movement. In this case, it is determined that the terminal device is currently in an outdoor scene.
[0141] For example, the second distance threshold is set to 50 meters. When the maximum value of the second relative distance between each third location, the second target distance, is greater than 50 meters, it is determined that the terminal device is currently in an outdoor scene.
[0142] In this embodiment of the disclosure, determining the current usage scenario of the terminal device based on the second target distance can improve the accuracy of outdoor scene detection for the terminal device.
[0143] In some embodiments, determining the current usage scenario of the terminal device based on the third relative distance includes: if the second target distance is less than or equal to the second distance threshold, determining the current usage scenario of the terminal device based on the third relative distance. If the second target distance is less than or equal to the second distance threshold, it indicates that the current usage scenario of the terminal device cannot meet the condition for determining the usage scenario of the terminal device using the second target distance. In this case, the current usage scenario of the terminal device is determined based on the third relative distance.
[0144] In some embodiments, determining the current usage scenario of the terminal device based on a third relative distance includes:
[0145] The third target distance is determined based on the sum of the various third relative distances. If the third target distance is greater than a preset third distance threshold, the terminal device is determined to be in an outdoor scene. If the third target distance is less than or equal to the third distance threshold, the terminal device is determined to be in a non-outdoor scene.
[0146] In this embodiment of the disclosure, the sum of the relative distances between adjacent positions in the first position, the second position, and each of the third positions is determined as the third target distance. The third target distance represents the total straight-line distance between adjacent positions during the process of the terminal device moving from the first position to the second position.
[0147] If the distance to the third target is greater than the preset third distance threshold, it means that the total distance determined by the sum of the distances between the first position, the second position, and each of the third positions of the terminal device exceeds the preset distance. At this time, it is determined that the terminal device is currently in an outdoor scene.
[0148] For example, the fourth threshold is preset to 100 meters. When the sum of the third relative distances, i.e. the distance to the third target, is greater than 100 meters, it is determined that the terminal device is currently in an outdoor scene.
[0149] If the distance to the third target is less than or equal to the preset third distance threshold, it means that the total distance determined by the sum of the distances between the first position, the second position, and each of the third positions of the terminal device has not exceeded the preset distance. At this time, it is determined that the terminal device is currently in a non-outdoor scene.
[0150] In this embodiment of the disclosure, determining whether the terminal device is currently in an outdoor scene based on the distance to the third target is simpler and more convenient than determining the usage scene based on the actual moving distance of the terminal device. Moreover, it only requires detecting the first position, the second position, and each of the third positions of the terminal device, thus reducing the power consumption of the terminal device.
[0151] In some embodiments, obtaining the third position corresponding to different battery levels during the process of the terminal device moving from the first position to the second position includes:
[0152] If the difference between the battery level at the first position and the battery level at the second position is greater than a preset battery level difference, the third position corresponding to different battery levels is obtained during the process of the terminal device moving from the first position to the second position.
[0153] It should be noted that the preset battery difference is a preset value, which is used to determine whether it is necessary to obtain the third location of the terminal device.
[0154] When the difference between the battery level at the first position and the battery level at the second position is greater than a preset difference, it indicates that the terminal device consumes a lot of power during the process of moving from the first position to the second position, and may be currently in an outdoor scene. In this case, it is necessary to obtain the third position corresponding to different battery levels during the process of the terminal device moving from the first position to the second position in order to determine whether the terminal device is currently in an outdoor scene.
[0155] In some embodiments, the charging method further includes: if the difference between the power level at the first location and the power level at the second location is less than or equal to a preset power difference, determining that the terminal device will not identify the current usage scenario.
[0156] When the difference between the battery level of the terminal device at the first position and the battery level at the second position is less than or equal to a preset battery level difference, it indicates that the terminal device consumes less power during the process of moving from the first position to the second position, and there is no need to identify the current usage scenario of the terminal device.
[0157] In this embodiment, the power consumption of the terminal device can be determined by the power difference between the first and second positions. Based on the power consumption, it can be determined whether it is necessary to identify the current usage scenario. This reduces unnecessary identification of the current usage scenario, thereby lowering the power consumption of the terminal device.
[0158] In some embodiments, the charging method further includes:
[0159] If it is determined that the terminal device is currently in an outdoor environment, switch the terminal device to fast charging mode;
[0160] When charging a mobile device in fast charging mode, if the mobile device's battery level reaches a preset threshold, the fast charging mode will be exited.
[0161] Since charging devices outdoors is more inconvenient than in indoor environments, when it's determined that the device is currently outdoors, fast charging mode should be selected. This will improve the charging speed of the device outdoors.
[0162] When a terminal device is charging in fast charging mode outdoors, if the battery level reaches the preset threshold, it means that the current battery level can meet the user's needs. At this point, the fast charging mode is exited, which can reduce the problem of the terminal device overheating due to fast charging.
[0163] In some embodiments, when it is determined that the terminal device is currently in an outdoor environment, switching the terminal device to fast charging mode includes:
[0164] If the terminal device is currently in an outdoor environment, determine the remaining battery power when the terminal device is in the second location; if the remaining battery power when the terminal device is in the second location is less than a preset threshold, switch the terminal device to fast charging mode.
[0165] It should be noted that when the terminal device is in an outdoor environment, the remaining battery power when the terminal device is in the second position can be used to determine whether the terminal device needs to be charged and whether fast charging mode needs to be used.
[0166] When the remaining battery power of the terminal device is greater than the preset threshold when it is in the second position, it means that the current battery power of the terminal device is sufficient to meet the user's needs. At this time, it is not necessary to charge or use fast charging mode.
[0167] When the remaining battery power of the terminal device is less than the preset threshold when it is in the second position, it means that the current battery power of the terminal device cannot meet the user's needs. At this time, the terminal device is switched to fast charging mode to facilitate fast charging of the terminal device.
[0168] In some embodiments, when it is determined that the terminal device is currently in an outdoor environment, switching the terminal device to fast charging mode includes:
[0169] If it is determined that the terminal device is currently in an outdoor environment, determine the charging type for charging the terminal device;
[0170] Based on the charging type, the terminal device is switched to the corresponding fast charging mode. The charging parameters for the fast charging mode differ depending on the charging type.
[0171] Here, charging types include power bank charging and stationary power source charging. Different charging types use different charging protocols.
[0172] Portable power banks are categorized based on their working principle and energy storage method, including lithium-ion battery power banks, alkaline battery power banks, and solar power banks. Charging parameters include charging current and charging voltage.
[0173] Based on the charging type, the terminal device is switched to the corresponding fast charging mode, including: switching the terminal device to a fast charging mode corresponding to a first charging type; and switching the terminal device to a fast charging mode corresponding to a second charging type. For example, in the fast charging mode corresponding to the first charging type, the charging voltage to the terminal device is increased; in the fast charging mode corresponding to the second charging type, the charging current to the terminal device is increased. Selecting the corresponding fast charging mode according to different charging types can improve the charging efficiency of the terminal device, thereby better achieving the purpose of fast charging.
[0174] In some embodiments, switching the terminal device to the corresponding fast charging mode based on the charging type includes:
[0175] When the charging type is power bank charging, switch the terminal device to the first fast charging mode;
[0176] When the charging type is fixed power supply charging, switch the terminal device to the second fast charging mode;
[0177] In the first fast charging mode, the charging current for charging the terminal device is increased; in the second fast charging mode, the upper limit of the temperature control module is increased.
[0178] It should be noted that when the charging type is a power bank or portable power bank, increasing the charging current to the terminal device constitutes the first fast charging mode. When the charging type is a fixed power source or charger, increasing the upper limit of the temperature control module constitutes the second fast charging mode.
[0179] In this embodiment, different fast charging modes are determined based on different charging types, and different parameters are adjusted for different fast charging modes. This allows for better adaptation to different charging conditions, thereby improving the charging speed of the terminal device.
[0180] Figure 2 This is a distribution diagram of a first position, a second position, and various third positions according to an exemplary embodiment. For example... Figure 2As shown, the terminal device records the battery level, location information (virtual relative position transmitted by the sensor module), and charging type when charging is completed at the first location. It also records the battery level and relative position information at each of the third locations as the terminal device moves from the first to the second location. The terminal device's location information is represented using coordinate points according to a preset coordinate axis. The first charging completion point is the first location, with coordinates (X0, Y0) and a battery level of Z0. The next charging point is the second location, with coordinates (X6, Y6) and a battery level of Z6. The coordinates of each third location are (X1, Y1), (X2, Y2), (X3, Y3), (X4, Y4), and (X5, Y5), and the battery levels at each third location are Z1, Z2, Z3, Z4, and Z5, respectively. During the process of moving from the first to the second location, the battery level decreases from 70% to 10%.
[0181] Figure 3 This is a flowchart illustrating a charging method according to an exemplary embodiment. Figure 3 As shown, this charging method is used in a terminal device, where the device's location information is represented by coordinate points according to a preset coordinate axis. During the movement from the first position to the second position, the coordinates of the first position are (X0, Y0), and the battery level at the first position is Z0. The coordinates of the second position are (Xn, Yn), and the remaining battery level at the second position is Zn. The coordinates of the first position, each of the third positions, and the second position are (X0, Y0), (X1, Y1), and (Xn, Yn), respectively. The battery levels of the first position, each of the third positions, and the second position are Z0, Z1, Z2, ..., Zn, respectively.
[0182] After determining that outdoor scene recognition is required, the current usage scenario of the terminal device is determined based on the first location, the various third locations, and the distances between the second locations. For example... Figure 3 As shown, the charging method includes the following steps:
[0183] Step 110: Start the current usage scenario recognition of the terminal device.
[0184] Step 111: Obtain the first location and battery level of the terminal device when it finishes charging.
[0185] Step 112: During the process of moving the terminal device from the first position to the second position, if the power loss reaches the preset power loss position, then the third position is determined.
[0186] Step 113: Determine if the terminal device is charging. If yes, proceed to step 114; otherwise, return to step 111.
[0187] Step 114: Determine whether the difference between the battery level at the first position and the battery level at the second position is greater than a preset battery level difference. If yes, proceed to step 115. If no, proceed to step 120.
[0188] In step 114, the determination of whether outdoor scene recognition is needed is as follows: First, a power difference value P0 is preset. When Z0 – Zn < power difference value P0, it indicates that the power loss is low, and there is no need to recognize the outdoor scene. When Z0 – Zn >= power difference value P0, it indicates that fast charging mode may need to be activated, and it is necessary to recognize the outdoor scene.
[0189] Step 115: Obtain the second position and the remaining battery power when in the second position.
[0190] Step 116: Determine whether the terminal device is in an outdoor scene based on the first relative distance. If yes, proceed to step 119. If no, proceed to step 117.
[0191] A first target distance is determined from all first relative distances. The first target distance is the maximum value among all first relative distances. If the first target distance is greater than a preset first distance threshold, it is determined that the terminal device is currently in an outdoor scene.
[0192] In step 116, determining whether the terminal device is in an outdoor scene based on the first relative distance includes method (1): calculating the first relative distance between the first position with a battery level of Z0 and each of the third positions, and the first relative distance R1, R2, ..., Rn between the second position and the first position:
[0193] First relative distance R i The calculation formula is as follows:
[0194] R i =(X0-X i ) 2 +(Y0-Y i ) 2 ,i=0,1,……,n (1);
[0195] In formula (1), X0 represents the x-coordinate of the first position, Y0 represents the y-coordinate of the first position, and X... i Y represents the x-coordinate of any one of the third or second positions. i This represents the ordinate of any one of the third or second positions.
[0196] The maximum distance among the first relative distances between the first position with charge Z0 and each of the third positions, and the first relative distance between the first position with charge Z0 and the second position, is determined as the first target distance R. max R max=max(R0,...R n When R max If the distance is greater than the first distance threshold R, it indicates that the terminal device is in an outdoor scene; otherwise, it is in a non-outdoor scene.
[0197] However, in method (1), the user will use the terminal device to circle around the first location. If the user is in an outdoor scene, but the terminal device is determined to be in a non-outdoor scene based on the first target distance being less than the first distance threshold, there may be a misjudgment. In this case, it is necessary to further determine the current usage scenario of the terminal device based on the second relative distance.
[0198] Step 117: Determine whether the terminal device is in an outdoor scene based on the second relative distance. If yes, proceed to step 119. If no, proceed to step 118.
[0199] In step 117, determining whether the terminal device is in an outdoor scene based on the second relative distance includes method (2): when method (1) does not meet the outdoor scene requirement, it is necessary to determine the second relative distance between each third location and determine the current usage scene of the terminal device based on the second relative distance. The maximum distance among all the second relative distances is determined as the second target distance, and the terminal device is determined as an outdoor scene based on the second target distance.
[0200] Calculate the second relative distance R between any two positions in the series Z1, ..., Zn. i,j The calculation formula is as follows:
[0201] R i,j =(X i -X j ) 2 +(Y i -Y j ) 2 i, j=1,...,n; i≠j (2);
[0202] In formula (2), X i Y represents the x-coordinate of any position. i X represents the ordinate of any position. j The x-coordinate of another location, Y j The ordinate represents the other location, where i ≠ j indicates two distinct locations. The distance to the second target is Rmax = max(R... 1,2 ,…R i,j Let i,j = 1, ...,n; i ≠ j. When Rmax is greater than the second distance threshold RR, it indicates that the terminal device is in an outdoor scene.
[0203] Step 118: Determine whether the terminal device is in an outdoor scene based on the third relative distance. If yes, proceed to step 119. If no, proceed to step 120.
[0204] In step 118, the determination of whether the terminal device is in an outdoor scene is based on the third relative distance, including method (3): when the user's location does not meet both method (1) and method (2), the user may be moving in circles in a certain place, such as running. In this case, the third relative distance between two adjacent locations is calculated to determine whether the user is in an outdoor scene. First, it is necessary to calculate (Z0Z1), (Z1Z2), (Z3Z4), ..., (Z n-1 Z n The third relative distance between two adjacent positions in a given area is given by the following formula:
[0205] R i =(X i -X i+1 ) 2 +(Y i -Y i+1 ) 2 i = 0, ..., n-1 (3);
[0206] In formula (3), X i Y represents the x-coordinate of any position. i X represents the ordinate of any position. i+1 Y represents the x-coordinate of the next position from any given position. i+1 It represents the ordinate of the next position in any given position.
[0207] The sum of the third relative distances calculated based on the third relative distance between two adjacent locations is determined as the third target distance. When the distance S from the third target is greater than the third distance threshold s, it is determined that the terminal device is in an outdoor scene.
[0208] Step 119: Determine that the terminal device is in an outdoor environment.
[0209] Step 120: Determine that the terminal device is in a non-outdoor scene.
[0210] Figure 4 This is a flowchart illustrating a charging method according to an exemplary embodiment. Figure 4 As shown, this charging method is used in terminal devices, and the method mainly includes the following steps:
[0211] Step 130: Begin.
[0212] Step 131: Determine if the terminal device has started charging. If yes, proceed to step 132.
[0213] Step 132: Determine if the terminal device is in an outdoor environment. If yes, proceed to step 133.
[0214] Step 133: Determine whether the remaining battery power of the terminal device in the second position is less than a preset threshold. If so, proceed to step 1341 or step 1342.
[0215] Step 1341: If the terminal device uses a power bank, proceed to step 1351.
[0216] Step 1342: If the terminal device uses a fixed power supply, proceed to step 1352.
[0217] Step 1351: Increase the charging current for charging the terminal device.
[0218] Step 1352: Increase the upper limit of the temperature of the temperature control module.
[0219] Step 136: Accelerating charging.
[0220] Step 137: Determine if the terminal device's battery level has reached the preset battery threshold. If yes, proceed to step 138. If no, proceed to step 136.
[0221] Step 138: Exit accelerated charging.
[0222] Step 139: Normal charging.
[0223] For example, when the terminal device is in the second position and charging begins, the current usage scenario of the terminal device is determined. If it is determined that the terminal device is currently in an outdoor scenario, the remaining battery power of the terminal device in the second position is obtained. If the remaining battery power of the terminal device in the second position is greater than a preset threshold, standard charging mode is used. If the remaining battery power of the terminal device in the second position is less than or equal to the preset threshold, the charging mode of the terminal device is switched to fast charging mode. When using a power bank to charge the terminal device, the charging speed is increased to 5V / 1.8A. When using a fast charger to charge the terminal device, the 1℃ casing temperature limit is relaxed to increase the charging current of the terminal device, thereby increasing the charging speed. When charging the terminal device in fast charging mode, when the terminal device's battery level reaches the preset battery level threshold, the fast charging mode is exited, and the terminal device is charged in standard charging mode.
[0224] Figure 5 This is a block diagram illustrating a charging device according to an exemplary embodiment. Figure 5 As shown, the device mainly includes:
[0225] The first acquisition unit 501 is configured to acquire the first position of the terminal device when charging ends and the current second position of the terminal device.
[0226] The second acquisition unit 502 is configured to acquire the third position corresponding to different battery levels during the process of the terminal device moving from the first position to the second position; wherein the third position is the position traversed by the terminal device during the movement.
[0227] The determining unit 503 is configured to determine the current usage scenario of the terminal device based on the first position, the second position, and each of the third positions.
[0228] The charging unit 504 is configured to charge the terminal device according to the current usage scenario.
[0229] In some embodiments, the second acquisition unit 502 includes:
[0230] The first acquisition subunit is configured to acquire the power loss of the terminal device in real time as the terminal device moves from the first position to the second position; wherein, the power loss is the power consumption value of the terminal device. The determination subunit is configured to determine the position where the terminal device's power loss reaches a preset power loss value as the third position. Specifically, a third position is determined each time the power loss reaches the preset power loss value.
[0231] In some embodiments, the determining unit 503 is specifically configured as at least one of the following:
[0232] Determine the first relative distance between each third position and the first position, and the first relative distance between the second position and the first position, and determine the current usage scenario of the terminal device based on the first relative distance.
[0233] Determine the second relative distance between each third location, and determine the current usage scenario of the terminal device based on the second relative distance.
[0234] The third relative distance between two adjacent positions is determined in the first position, the second position, and each third position, and the current usage scenario of the terminal device is determined based on the third relative distance.
[0235] Relative distance includes: straight-line distance.
[0236] In some embodiments, determining the current usage scenario of the terminal device based on a first relative distance includes: determining a first target distance from all first relative distances; wherein the first target distance is the maximum value among all first relative distances. If the first target distance is greater than a preset first distance threshold, it is determined that the terminal device is currently in an outdoor scenario.
[0237] In some embodiments, determining the current usage scenario of the terminal device based on the second relative distance includes: determining the current usage scenario of the terminal device based on the second relative distance when the first target distance is less than or equal to the first distance threshold.
[0238] In some embodiments, determining the current usage scenario of the terminal device based on a second relative distance includes: determining a second target distance from all second relative distances; wherein the second target distance is the maximum value among all second relative distances. If the second target distance is greater than a preset second distance threshold, it is determined that the terminal device is currently in an outdoor scenario.
[0239] In some embodiments, determining the current usage scenario of the terminal device based on the third relative distance includes: determining the current usage scenario of the terminal device based on the third relative distance when the second target distance is less than or equal to the second distance threshold.
[0240] In some embodiments, determining the current usage scenario of the terminal device based on a third relative distance includes: determining a third target distance based on the sum of various third relative distances. If the third target distance is greater than a preset third distance threshold, the terminal device is determined to be in an outdoor scenario. If the third target distance is less than or equal to the third distance threshold, the terminal device is determined to be in a non-outdoor scenario.
[0241] In some embodiments, the second acquisition unit 502 includes:
[0242] The second acquisition subunit is configured to acquire the third position corresponding to different battery levels during the process of the terminal device moving from the first position to the second position when the difference between the battery level at the first position and the battery level at the second position is greater than a preset battery level difference.
[0243] The charging device further includes a second determining unit, configured to determine that the terminal device will not identify the current usage scenario if the difference between the power level at the first position and the power level at the second position is less than or equal to a preset power level difference.
[0244] In some embodiments, the charging device further includes a switching unit configured to switch the terminal device to fast charging mode when it is determined that the terminal device is currently in an outdoor scene.
[0245] The control unit is configured to exit the fast charging mode if the mobile terminal's battery level reaches a preset battery threshold when the mobile terminal is being charged in the fast charging mode.
[0246] In some embodiments, the switching unit includes a third determining subunit configured to determine the remaining battery power of the terminal device when it is in a second location, provided that the terminal device is currently in an outdoor scene.
[0247] The switching unit is also configured to switch the terminal device to fast charging mode when the remaining power of the terminal device is less than a preset threshold when the terminal device is in the second position.
[0248] In some embodiments, the switching unit includes:
[0249] The fourth determining subunit is configured to determine the charging type for charging the terminal device when it is determined that the terminal device is currently in an outdoor scene.
[0250] The switching unit is also configured to switch the terminal device to the corresponding fast charging mode based on the charging type. The charging parameters for the fast charging mode differ depending on the charging type.
[0251] In some embodiments, the switching unit includes:
[0252] The first switching subunit is configured to switch the terminal device to a first fast charging mode when the charging type is power bank charging, and to switch the terminal device to a second fast charging mode when the charging type is fixed power supply charging. Specifically, in the first fast charging mode, the charging current for the terminal device is increased. In the second fast charging mode, the upper temperature limit of the temperature control module is increased.
[0253] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0254] Figure 6 This is a structural block diagram illustrating a device 600 according to an exemplary embodiment. For example, device 600 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.
[0255] Reference Figure 6 The device 600 may include one or more of the following components: processing component 602, memory 604, power supply component 606, multimedia component 608, audio component 610, input / output (I / O) interface 612, sensor component 614, and communication component 616.
[0256] Processing component 602 typically controls the overall operation of device 600, such as operations associated with at least one of display, telephone call, data communication, camera operation, and recording operation. Processing component 602 may include one or more processors 620 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 602 may include one or more modules to facilitate interaction between processing component 602 and other components. For example, processing component 602 may include a multimedia module to facilitate interaction between multimedia component 608 and processing component 602.
[0257] Memory 604 is configured to store various types of data to support operation on device 600. Examples of such data include at least one of the following: instructions for any application or method operating on device 600, contact data, phonebook data, messages, pictures, and videos. Memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0258] Power supply component 606 provides power to various components of device 600. Power supply component 606 may include at least one of the following: a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to device 600.
[0259] Multimedia component 608 includes a screen that provides an output interface between device 600 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a Touch Panel, the screen may be implemented as a touchscreen to receive input signals from the user. The Touch Panel includes one or more touch sensors to sense touches, swipes, and gestures on the Touch Panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 608 includes a front-facing camera and / or a rear-facing camera. When device 600 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0260] Audio component 610 is configured to output and / or input audio signals. For example, audio component 610 includes a microphone (MIC) configured to receive external audio signals when device 600 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 604 or transmitted via communication component 616. In some embodiments, audio component 610 also includes a speaker for outputting audio signals.
[0261] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, and buttons. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0262] Sensor assembly 614 includes one or more sensors for providing state assessments of various aspects of device 600. For example, sensor assembly 614 may detect the on / off state of device 600, the relative positioning of components such as the display and keypad of device 600, changes in the position of device 600 or one of its components, the presence or absence of user contact with device 600, the orientation or acceleration / deceleration of device 600, and temperature changes of device 600. Sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 614 may also include an optical sensor, such as a complementary metal-oxide-semiconductor (CMOS) or charge-coupled device (CCD) image sensor, for use in imaging applications. In some embodiments, sensor assembly 614 may also include, but is not limited to, at least one of the following: an accelerometer, a gyroscope, a magnetometer, a pressure sensor, and a temperature sensor.
[0263] Communication component 616 is configured to facilitate wired or wireless communication between device 600 and other devices. Device 600 can access wireless networks based on communication standards, such as Wi-Fi, 4G, 5G, or combinations thereof. In one exemplary embodiment, communication component 616 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 616 also includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID), Infrared Data Association (IrDA), Ultra Wide Band (UWB), Bluetooth (BT), and other technologies.
[0264] In an exemplary embodiment, device 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components.
[0265] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including executable instructions or a computer program, which can be executed by the processor 620 of the device 600 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device, etc.
[0266] This disclosure provides an electronic device, comprising: a processor; and a memory for storing computer programs or instructions; wherein the processor executes the computer programs or instructions to implement the charging method described in any of the above embodiments. For example, the method includes: acquiring a first position of the terminal device when charging ends and a second position of the terminal device; acquiring third positions corresponding to different battery levels during the process of the terminal device moving from the first position to the second position; wherein the third positions are the positions traversed by the terminal device during its movement; determining the current usage scenario of the terminal device based on the first position, the second position, and each of the third positions; and charging the terminal device according to the current usage scenario.
[0267] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by the processor of a mobile terminal, enables the mobile terminal to perform any of the charging methods described in the embodiments of this disclosure.
[0268] This disclosure provides a computer program product comprising 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 executes the computer program or executable instructions, causing the computer device to perform any of the charging methods described in this disclosure.
[0269] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.
[0270] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A charging method, characterized in that, include: Obtain the first position of the terminal device when charging ends and the current second position of the terminal device; The third position corresponding to different battery levels is obtained during the process of the terminal device moving from the first position to the second position; wherein, the third position is the position traversed by the terminal device during the movement. Based on the first location, the second location, and each of the third locations, the current usage scenario of the terminal device is determined; The terminal device is charged according to the current usage scenario.
2. The method according to claim 1, characterized in that, The step of obtaining the third position corresponding to different battery levels during the process of the terminal device moving from the first position to the second position includes: During the process of the terminal device moving from the first position to the second position, the power loss of the terminal device is acquired in real time; wherein, the power loss is the power consumption value of the terminal device; The terminal device is defined as the third position when the power loss reaches the preset power loss position. Each time the power loss reaches the preset power loss, a third position is determined.
3. The method according to claim 1, characterized in that, Determining the current usage scenario of the terminal device based on the first location, the second location, and each of the third locations includes at least one of the following: Determine the first relative distance between each of the third locations and the first location, and the first relative distance between the second location and the first location, and determine the current usage scenario of the terminal device based on the first relative distance; Determine the second relative distance between each of the third locations, and determine the current usage scenario of the terminal device based on the second relative distance; The third relative distance between two adjacent positions in the first position, the second position, and each of the third positions is determined respectively, and the current usage scenario of the terminal device is determined based on the third relative distance; The relative distance includes: straight-line distance.
4. The method according to claim 3, characterized in that, Determining the current usage scenario of the terminal device based on the first relative distance includes: A first target distance is determined from all the first relative distances; wherein the first target distance is the maximum value among all the first relative distances; If the distance to the first target is greater than a preset first distance threshold, it is determined that the terminal device is currently in an outdoor scene.
5. The method according to claim 4, characterized in that, Determining the current usage scenario of the terminal device based on the second relative distance includes: If the first target distance is less than or equal to the first distance threshold, the current usage scenario of the terminal device is determined based on the second relative distance.
6. The method according to claim 3, characterized in that, Determining the current usage scenario of the terminal device based on the second relative distance includes: Determine the second target distance from all the second relative distances; wherein the second target distance is the maximum value among all the second relative distances; If the distance to the second target is greater than a preset second distance threshold, it is determined that the terminal device is currently in an outdoor scene.
7. The method according to claim 6, characterized in that, Determining the current usage scenario of the terminal device based on the third relative distance includes: If the second target distance is less than or equal to the second distance threshold, the current usage scenario of the terminal device is determined based on the third relative distance.
8. The method according to claim 3, characterized in that, Determining the current usage scenario of the terminal device based on the third relative distance includes: The third target distance is determined based on the sum of the values of the third relative distances. If the distance to the third target is greater than a preset third distance threshold, it is determined that the terminal device is currently in an outdoor scene; If the distance to the third target is less than or equal to the third distance threshold, it is determined that the terminal device is currently in a non-outdoor scene.
9. The method according to any one of claims 1 to 8, characterized in that, The step of obtaining the third position corresponding to different battery levels during the process of the terminal device moving from the first position to the second position includes: If the difference between the battery level at the first position and the battery level at the second position is greater than a preset battery level difference, the third position corresponding to different battery levels is obtained during the process of the terminal device moving from the first position to the second position; The method further includes: If the difference between the battery level at the first location and the battery level at the second location is less than or equal to the preset battery level difference, the terminal device is determined not to identify the current usage scenario.
10. The method according to any one of claims 1 to 8, characterized in that, The method further includes: If it is determined that the terminal device is currently in an outdoor environment, switch the terminal device to fast charging mode; When the mobile terminal is charged in the fast charging mode, if the mobile terminal's battery level reaches a preset battery threshold, the fast charging mode is exited.
11. The method according to claim 10, characterized in that, The step of switching the terminal device to fast charging mode when it is determined that the terminal device is currently in an outdoor scene includes: If it is determined that the terminal device is currently in the outdoor scene, the remaining battery power of the terminal device when it is in the second location is determined; When the remaining battery power of the terminal device in the second position is less than a preset threshold, the terminal device is switched to the fast charging mode.
12. The method according to claim 10, characterized in that, The step of switching the terminal device to fast charging mode when it is determined that the terminal device is currently in the outdoor scene includes: If it is determined that the terminal device is currently in the outdoor scene, determine the charging type for charging the terminal device; Based on the charging type, the terminal device is switched to the corresponding fast charging mode; The charging parameters for fast charging modes vary depending on the charging type.
13. The method according to claim 12, characterized in that, The step of switching the terminal device to the corresponding fast charging mode based on the charging type includes: When the charging type is power bank charging, the terminal device is switched to the first fast charging mode; When the charging type is fixed power supply charging, the terminal device is switched to the second fast charging mode; In the first fast charging mode, the charging current for charging the terminal device is increased; in the second fast charging mode, the upper limit of the temperature control module is increased.
14. A charging device, characterized in that, include: The first acquisition unit is configured to acquire the first position of the terminal device when charging ends and the current second position of the terminal device. The second acquisition unit is configured to acquire a third position corresponding to different battery levels during the process of the terminal device moving from the first position to the second position; wherein, the third position is the position traversed by the terminal device during the movement. The determining unit is configured to determine the current usage scenario of the terminal device based on the first position, the second position, and each of the third positions; The charging unit is configured to charge the terminal device according to the current usage scenario.
15. An electronic device, characterized in that, 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 13.
16. A non-transitory computer-readable storage medium storing a computer program or instructions, characterized in that, 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 13 are implemented.
17. A computer program product comprising a computer program 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 13.