Information processing method, device and electronic equipment
By detecting the battery status of the electronic device and adjusting the operation based on the target strategy, the problem of continuous battery discharge caused by insufficient adapter power is solved, and the effect of extending the device's usage time is achieved.
Patent Information
- Application Number
- CN202210561362.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-23
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2042-05-23
AI Technical Summary
During the use of electronic devices, the battery is continuously discharged due to insufficient adapter power, resulting in the use time of the device that does not meet user expectations.
By detecting the battery state of the electronic device, if it is in a discharge state, adjust the operation of the device based on the target strategy until the battery discharge stops. Specific methods include obtaining processor power consumption, selecting a processor with lower power consumption as the target processor, and gradually reducing its power consumption.
It realizes that when the electronic device is connected to the power adapter, only the power provided by the adapter is used to avoid battery discharge and extend the device's use time.
Smart Images

Figure CN114895768B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information technology, and more specifically, to an information processing method, device and electronic device. Background Art
[0002] When using an electronic device equipped with a battery, a user connects an adapter to the electronic device in the hope of extending the use time of the device.
[0003] However, when the system power consumption of the electronic device is large and the power of the adapter is insufficient, the battery of the electronic device discharges to supplement the insufficient power of the adapter, which will cause the battery of the electronic device to continue to discharge until the battery is exhausted, and the usage time of the electronic device does not meet the user's expectations. Summary of the invention
[0004] In view of this, the present application provides an information processing method as follows:
[0005] An information processing method, the method comprising:
[0006] If the power adapter is connected to the electronic device, control the power supply parameters provided by the power adapter as the working power supply of the electronic device;
[0007] Detecting a battery of the electronic device;
[0008] If the battery is in a discharging state, the operation of the electronic device is adjusted based on a target policy until the battery stops discharging.
[0009] Optionally, in the above method, if the battery is in a discharging state, adjusting the operation of the electronic device based on a target strategy until the battery stops discharging includes:
[0010] obtaining power consumption in at least two processors in an electronic device;
[0011] Determine a first processor as a target processor, wherein power consumption of the target processor is less than that of a second processor of the at least two processors;
[0012] The power consumption of the target processor is reduced.
[0013] Optionally, the above method, after reducing the power consumption of the target processor, further includes:
[0014] If the battery is in a discharging state, it is determined whether to reduce the power consumption of the target processor again based on a first frame rate before reducing the power consumption of the target processor and a second frame rate after reducing the power consumption of the target processor.
[0015] Optionally, the above method, based on the first frame rate before reducing the power consumption of the target processor and the second frame rate after reducing the power consumption of the target processor, determines whether to reduce the power consumption of the target processor again, including:
[0016] Based on the first frame rate and the second frame rate satisfying the adjustment condition, the power consumption of the target processor is reduced again.
[0017] Optionally, the above method further includes:
[0018] Based on the fact that the first frame rate and the second frame rate do not satisfy the adjustment condition, the power consumption of the target processor is restored to the power consumption before the current reduction, and the second processor of the at least two processors is selected as the target processor to reduce the power consumption of the target processor.
[0019] Optionally, the above method, after selecting the second processor of the at least two processors as the target processor and reducing the power consumption of the target processor, further includes:
[0020] If the battery is in a discharging state, a parameter of the adjustment condition is adjusted based on that a first frame rate before reducing the power consumption of the target processor and a second frame rate after reducing the power consumption of the target processor do not satisfy an adjustment condition.
[0021] Optionally, after reducing the power consumption of the target processor, the above method further includes:
[0022] If the battery is in a discharging state, the parameters of the adjustment condition are adjusted based on the battery power information.
[0023] An information processing device, comprising:
[0024] Battery;
[0025] A power adapter interface, used to connect to a power adapter and receive power supply parameters provided by the power adapter;
[0026] The processing modules are respectively connected to the battery and the power adapter interface, and are used to control the power supply parameters provided by the power adapter as the working power supply of the electronic device when the power adapter is connected to the electronic device; detect the battery of the electronic device; if the battery is in a discharging state, adjust the operation of the electronic device based on the target strategy until the battery stops discharging.
[0027] Optionally, the above device further includes:
[0028] at least two processors respectively connected to the processing modules, the at least two processors having different power consumptions;
[0029] The processing module is used to: obtain power consumption in at least two processors in an electronic device; determine a first processor as a target processor, the power consumption of the target processor is less than that of a second processor in the at least two processors; and reduce the power consumption of the target processor.
[0030] An electronic device, comprising: a memory and a processor;
[0031] Wherein, the memory stores a processing program;
[0032] The processor is used to load and execute the processing program stored in the memory to implement each step of the information processing method as described in any one of the above items.
[0033] It can be known from the above technical scheme that the present application provides an information processing method, in which if a power adapter is connected to an electronic device, the power supply parameters provided by the power adapter are controlled as the working power supply of the electronic device; the battery of the electronic device is detected; if the battery is in a discharge state, the operation of the electronic device is adjusted based on a target strategy until the battery stops discharging. In this scheme, a target strategy is set, and when the electronic device receives the power supply parameters provided by the power adapter as the working power supply, the battery in the electronic device is in a discharge state, and the operation of the electronic device is adjusted based on the target strategy to achieve the purpose of stopping the battery discharge, ensuring that when the electronic device is connected to the power adapter, only the power provided by the power adapter is used, and the power in the battery is not consumed, thereby extending the use time of the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without creative work.
[0035] Figure 1 A flowchart of an information processing method embodiment 1 provided in this application;
[0036] Figure 2 A flowchart of an information processing method embodiment 2 provided in this application;
[0037] Figure 3 A flowchart of Example 3 of an information processing method provided by the present application;
[0038] Figure 4 A flowchart of Example 4 of an information processing method provided by the present application;
[0039] Figure 5A flowchart of Example 5 of an information processing method provided by the present application;
[0040] Figure 6 A flowchart of Example 6 of an information processing method provided by the present application;
[0041] Figure 7 A flowchart of Example 7 of an information processing method provided by the present application;
[0042] Figure 8 A schematic diagram of an application scenario of an information processing method provided in this application;
[0043] Fig. 9 A structural schematic diagram of an information processing method and device embodiment provided by the present application;
[0044] Fig.10 Another structural schematic diagram of an information processing method and device embodiment provided by the present application. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0046] like Figure 1 The flowchart of the embodiment 1 of the information processing method provided by the present application is shown. The method is applied to an electronic device, which can receive power provided by a power adapter and has a battery therein. The electronic device is also provided with multiple processors and can support the operation of multiple applications. The method includes the following steps:
[0047] Step S101: if a power adapter is connected to an electronic device, controlling the power supply parameters provided by the power adapter to be used as a working power supply for the electronic device;
[0048] The electronic device is provided with a battery, and the electronic device can also be connected to a power adapter, and the electronic device can receive electric energy provided by the power adapter.
[0049] When the power adapter is connected to the electronic device, the power supply parameters provided by the power adapter are controlled to be used as the working power supply of the electronic device.
[0050] Step S102: Detecting the battery of the electronic device;
[0051] The discharge condition of the battery can be detected by detecting the charging and discharging circuit.
[0052] A charging chip may also be provided in the electronic device, and the charging chip is used to monitor the charging and discharging conditions of the battery.
[0053] Among them, when the electronic device is connected to a power adapter, if the power consumption of the electronic device is large and exceeds the power supply parameters of the power adapter that can be provided, it will cause the battery to discharge. If the power consumption of the electronic device is small and does not exceed the power supply parameters of the power adapter that can be provided, the battery does not need to discharge.
[0054] Step S103: If the battery is in a discharging state, adjusting the operation of the electronic device based on a target strategy until the battery stops discharging.
[0055] If it is detected that the battery is in a discharging state, it indicates that the power consumption of the electronic device exceeds the power provided by the power adapter.
[0056] Therefore, a target policy is set in the electronic device, and the operation of the electronic device is adjusted based on the target policy so that the electronic device only uses the power provided by the power adapter and does not use the power of the battery, so as to stop the battery from discharging.
[0057] Specifically, the strategies for adjusting the operation of electronic devices may include disabling high-power consumption applications in electronic devices, disabling applications running in the background, or gradually reducing the power consumption of multiple processors in electronic devices.
[0058] In summary, the present embodiment provides an information processing method, if a power adapter is connected to an electronic device, controlling the power supply parameters provided by the power adapter as the working power supply of the electronic device; detecting the battery of the electronic device; if the battery is in a discharge state, adjusting the operation of the electronic device based on a target strategy until the battery stops discharging. In this solution, a target strategy is provided, and when the electronic device receives the power supply parameters provided by the power adapter as the working power supply, the battery in the electronic device is in a discharge state, and the operation of the electronic device is adjusted based on the target strategy to achieve the purpose of stopping the battery from discharging, ensuring that when the electronic device is connected to the power adapter, only the power provided by the power adapter is used, and the power in the battery is not consumed, thereby extending the use time of the electronic device.
[0059] like Figure 2 The figure is a flowchart of Embodiment 2 of an information processing method provided by the present application, and the method comprises the following steps:
[0060] Step S201: If the power adapter is connected to the electronic device, control the power supply parameters provided by the power adapter as the working power supply of the electronic device;
[0061] Step S202: Detecting the battery of the electronic device;
[0062] Among them, steps S201-202 are consistent with steps S101-102 in Example 1 and are not described in detail in this embodiment.
[0063] Step S203: obtaining power consumption of at least two processors in the electronic device;
[0064] There are multiple processors in the electronic device, and each processor consumes power during operation.
[0065] The processor includes a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), an EC (Embedded Controller), etc., but is not limited thereto.
[0066] In a specific implementation, the power consumption of all processors in the electronic device may be obtained, and all the processors may be used as at least two processors for subsequently reducing power consumption.
[0067] In a specific implementation, since the power consumption of some processors is very low, even if the low-power processor is turned off, the purpose of stopping battery discharge cannot be achieved. In this case, the low-power processor is ignored, and the remaining high-power processors are used as at least two processors for subsequent power reduction.
[0068] Specifically, a processor selection threshold is set, and if the ratio of the power consumption of a certain processor to the overall power consumption of the electronic device is less than the processor selection threshold, the processor is ignored.
[0069] For example, the processor selection threshold is 5%, the power consumption of the CPU in the electronic device is 50W (watts), the power consumption of the GPU is 60W, and the power consumption of the EC is 2W. The overall power consumption of the electronic device is 112W, and the power consumption of the EC accounts for 1.79%, which is less than the processor selection threshold. Therefore, the CPU and GPU in the electronic device are used as at least two processors in the electronic device to serve as processors for subsequent power consumption reduction.
[0070] Step S204: determining the first processor as a target processor, wherein the power consumption of the target processor is less than that of the second processor among the at least two processors;
[0071] The power consumption of at least two processors in the electronic device is sorted, and the first processor with the lowest power consumption is selected as the target processor.
[0072] Among them, since the processor with lower power consumption is less important during the operation of the electronic device, controlling and reducing the power consumption of the processor with lower importance will have less overall impact on the application programs running in the electronic device.
[0073] Moreover, when high-power applications (such as game applications, etc.) are running in an electronic device, generally, in order to support the operation of the high-power applications, the power consumption of the processor running the high-power applications is higher. Therefore, in order to maintain the operation of the high-power applications, a processor with lower power consumption is preferentially selected as the target processor, and the power consumption of the target processor is reduced.
[0074] Step S205: reducing the power consumption of the target processor until the battery stops discharging.
[0075] The steps are adjusted according to the agreement to reduce the power consumption of the target processor.
[0076] For example, if the adjustment step is 5W, the power consumption of the target processor is reduced by 5W each time.
[0077] In a specific implementation, each time the power consumption of the target processor is reduced, the discharge condition of the battery is detected. If the battery is still discharged, the power consumption of the target processor is reduced again until it is detected that the discharge of the battery stops.
[0078] In the specific implementation, in order to ensure that the overall power consumption of the processor of the electronic device is reduced so that the electronic device only needs the power provided by the power adapter without battery discharge, and also to ensure that the application running in the electronic device is not greatly affected, it is also necessary to determine the situation of the running application. In subsequent embodiments, the power consumption of the target processor will be controlled to be reduced in combination with the situation of the application running in the electronic device, which will not be described in detail in this embodiment.
[0079] In summary, an information processing method provided in this embodiment includes: obtaining the power consumption of at least two processors in an electronic device; determining a first processor as a target processor, wherein the power consumption of the target processor is less than that of a second processor among the at least two processors; and reducing the power consumption of the target processor. In this solution, among the at least two processors of the electronic device, the first processor with lower power consumption is selected as the target processor, and the power consumption of the target processor is reduced until the battery discharge stops. Since the processor with lower power consumption is less important during the operation of the electronic device, controlling and reducing the power consumption of the processor with lower importance has less overall impact on the applications running in the electronic device.
[0080] like Figure 3 The flowchart shown is a third embodiment of an information processing method provided by the present application, and the method comprises the following steps:
[0081] Step S301: If the power adapter is connected to the electronic device, control the power supply parameters provided by the power adapter as the working power supply of the electronic device;
[0082] Step S302: Detecting the battery of the electronic device;
[0083] Step S303: obtaining power consumption of at least two processors in the electronic device;
[0084] Step S304: determining the first processor as a target processor, wherein the power consumption of the target processor is less than that of the second processor among the at least two processors;
[0085] Step S305: reducing the power consumption of the target processor;
[0086] Among them, steps S301-305 are consistent with steps S201-205 in Example 2, and are not repeated in this embodiment.
[0087] Step S306: If the battery is in a discharging state, determine whether to reduce the power consumption of the target processor again based on the first frame rate before reducing the power consumption of the target processor and the second frame rate after reducing the power consumption of the target processor until the battery stops discharging.
[0088] After reducing the power consumption of the target processor, determine whether the battery is still in a discharging state. If the battery is still in a discharging state, it indicates that the overall power consumption of the electronic device is still greater than the power provided by the power adapter, and the power consumption of the electronic device needs to be further reduced.
[0089] It is necessary to determine whether the current reduction in power consumption has an impact on the performance of the electronic device running the application program, so as to determine whether to continue reducing the power consumption of the target processor.
[0090] Because the frame rate (i.e., the number of frames transmitted per second, FPS) of an electronic device affects the smoothness of the content output by the electronic device, it is a parameter for users to intuitively feel the performance of the electronic device. Therefore, in this embodiment, by comparing the changes in the frame rate of the electronic device before and after reducing the power consumption, it is determined whether reducing the power consumption of the target processor this time has an impact on the performance of the electronic device running applications.
[0091] The electronic device also has a display device capable of outputting display content, and reducing the power consumption of the target processor can affect the output frame rate of the display device.
[0092] Specifically, the frame rate of the electronic device can be that a specific application in the electronic device is started, triggering the start of automatic capture. The capture can be performed periodically, or it can be captured again after each power reduction. The frame rate of the last capture before reducing the power consumption of the target processor is used as the first frame rate, and the frame rate of the first capture after reducing the power consumption of the target processor is used as the second frame rate.
[0093] Among them, if it is determined based on the first frame rate and the second frame rate that the power consumption of the target processor can be further reduced, the power consumption of the target processor is further reduced. After the power consumption of the target processor is reduced, it is determined again whether the battery is in a discharging state. When the battery is still in a discharging state, it is determined again based on the frame rates before and after the power consumption of the target processor is reduced this time whether the power consumption of the target processor can continue to be reduced, until the discharge of the battery in the electronic device stops.
[0094] In a specific implementation, the frame rate captured for the first time when a specific application is started in the electronic device can be used as the first frame rate, and the frame rate captured each time the power consumption of the target processor is reduced can be used as the second frame rate. The performance changes after each reduction in the power consumption of the target processor and the moment when the electronic device starts the specific application can be compared to ensure that the operating performance of the electronic device is not seriously affected by reducing the power consumption of the target processor relative to the initial performance.
[0095] It should be noted that if the power consumption of the target processor is reduced or the overall power consumption required during the operation of the electronic device is reduced to a level lower than the power provided by the power adapter to the electronic device, the battery discharge is stopped and the excess power provided by the power adapter is used to charge the battery.
[0096] In summary, in an information processing method provided by this embodiment, after reducing the power consumption of the target processor, it also includes: if the battery is in a discharging state, based on the first frame rate before reducing the power consumption of the target processor and the second frame rate after reducing the power consumption of the target processor, determining whether to reduce the power consumption of the target processor again. In this solution, after reducing the power consumption of the target processor, if the battery is still in a discharging state, it is determined whether the power consumption of the target processor can continue to be reduced based on the frame rates before and after reducing the power consumption of the target processor this time, so as to determine whether the power consumption reduction this time has an impact on the performance of the electronic device.
[0097] like Figure 4 The figure is a flowchart of Embodiment 4 of an information processing method provided by the present application, and the method comprises the following steps:
[0098] Step S401: If the power adapter is connected to the electronic device, control the power supply parameters provided by the power adapter as the working power supply of the electronic device;
[0099] Step S402: Detecting the battery of the electronic device;
[0100] Step S403: Obtaining power consumption of at least two processors in the electronic device;
[0101] Step S404: determining the first processor as a target processor, wherein the power consumption of the target processor is less than that of the second processor among the at least two processors;
[0102] Step S405: reducing the power consumption of the target processor;
[0103] Among them, steps S401-405 are consistent with steps S301-305 in Example 3, and are not repeated in this embodiment.
[0104] Step S406: If the battery is in a discharging state, based on the first frame rate before reducing the power consumption of the target processor and the second frame rate after reducing the power consumption of the target processor satisfying the adjustment condition, the power consumption of the target processor is reduced again until the battery discharge stops.
[0105] The adjustment condition is that the change rate between the first frame rate and the second frame rate is not greater than a change threshold.
[0106] The value of the change threshold is generally a smaller value, such as 5%, 2%, etc. The present application does not limit the specific value of the change threshold.
[0107] Specifically, if the change rate between the first frame rate and the second frame rate is less than the change threshold, it indicates that this adjustment has little impact on the performance of the electronic device running the application program, and the power consumption of the target processor can continue to be reduced.
[0108] Among them, after reducing the power consumption of the target processor, if the battery is still in a discharging state, and the first frame rate of the electronic device before reducing the power consumption of the target processor and the second frame rate of the electronic device after reducing the power consumption of the processor meet the adjustment conditions, it is characterized that after reducing the power consumption of the target processor, although it has not been reduced to the power range that the power adapter can provide, it does not have a significant impact on the performance of the electronic device running the application, and the power consumption of the target processor continues to be reduced until the battery discharge stops.
[0109] In a specific implementation, after each reduction in the power consumption of the target processor, it is determined whether the battery is still in a discharging state. When the battery is still in a discharging state, it is continued to be determined whether the first frame rate and the second frame rate meet the adjustment conditions, so as to ensure that each reduction in the power consumption of the target processor will not have a significant impact on the performance of the electronic device running the application, thereby maintaining the user experience.
[0110] In summary, the information processing method provided in this embodiment includes: based on the first frame rate before reducing the power consumption of the target processor and the second frame rate after reducing the power consumption of the target processor satisfying the adjustment condition, the power consumption of the target processor is reduced again. In this solution, after reducing the power consumption of the target processor, it is determined whether the battery is still in a discharge state, and when the battery is still in a discharge state, it is determined whether the first frame rate and the second frame rate meet the adjustment condition. Only when the first frame rate and the second frame rate meet the adjustment condition, the power consumption of the target processor is reduced again, so as to ensure that each reduction in the power consumption of the target processor will not have a significant impact on the performance of the electronic device running the application.
[0111] like Figure 5 The figure is a flowchart of Embodiment 5 of an information processing method provided by the present application, and the method comprises the following steps:
[0112] Step S501: If the power adapter is connected to the electronic device, control the power supply parameters provided by the power adapter as the working power supply of the electronic device;
[0113] Step S502: Detecting the battery of the electronic device;
[0114] Step S503: Obtaining power consumption of at least two processors in the electronic device;
[0115] Step S504: determining the first processor as a target processor, wherein the power consumption of the target processor is less than that of the second processor among the at least two processors;
[0116] Step S505: reducing the power consumption of the target processor;
[0117] Step S506: if the battery is in a discharging state, based on that the first frame rate before reducing the power consumption of the target processor and the second frame rate after reducing the power consumption of the target processor meet an adjustment condition, reducing the power consumption of the target processor again;
[0118] Among them, steps S501-505 are consistent with steps S401-405 in Example 4, and are not repeated in this embodiment.
[0119] Step S507: Based on the fact that the first frame rate and the second frame rate do not satisfy the adjustment condition, the power consumption of the target processor is restored to the power consumption before this reduction, and the second processor of the at least two processors is selected as the target processor to reduce the power consumption of the target processor until the battery stops discharging.
[0120] If the first frame rate and the second frame rate do not meet the adjustment condition, it indicates that this adjustment has a great impact on the performance of the electronic device running the application program, and the power consumption of the target processor cannot be further reduced.
[0121] Among them, if the battery of the electronic device is still in a discharging state after reducing the power consumption of the target processor, but the first frame rate before reducing the power consumption of the target processor and the second frame rate after reducing the power consumption of the target processor do not meet the adjustment conditions, it indicates that even after the power consumption of the target processor is reduced this time, the overall power consumption of the electronic device has not been reduced to the range of power that the power adapter can provide, and the performance of the electronic device is affected, so the power consumption reduction control of the target processor is abandoned.
[0122] In order to further reduce the power consumption of the electronic device, the second processor is reselected as the target processor to reduce the power consumption of the second processor.
[0123] It should be noted that the second processor is a processor whose power consumption is only higher than that of the first processor among the at least two processors.
[0124] After the second processor is selected as the target processor, the target processor is continuously adjusted to reduce power consumption, and steps S506-507 are executed in a loop.
[0125] Among them, when the at least two processors in the electronic device are three, if the battery is still in a discharging state after the second processor reduces power consumption, but if the first frame rate and the second frame rate do not meet the adjustment, the power consumption adjustment for the second processor is abandoned, and the third processor is selected as the target processor, and the third processor is the processor with the highest power consumption. Similarly, according to the power consumption of at least two processors in the electronic device from low to high, the target processors are selected in turn, and the battery discharge is stopped without affecting the performance of the electronic device.
[0126] In summary, an information processing method provided by this embodiment also includes: based on the first frame rate and the second frame rate not satisfying the adjustment condition, restoring the power consumption of the target processor to the power consumption before this reduction, and selecting the second processor of the at least two processors as the target processor to reduce the power consumption of the target processor. In this solution, after gradually reducing the power consumption of the first processor, the battery discharge situation cannot be solved, and the performance of the electronic device is also affected. Therefore, the power consumption reduction control of the first processor is abandoned, and the second processor is selected as the new target processor, and the power consumption of the second processor is controlled to be reduced, so as to stop the battery discharge without affecting the performance of the electronic device.
[0127] like Figure 6The figure is a flowchart of Embodiment 6 of an information processing method provided by the present application, and the method comprises the following steps:
[0128] Step S601: If the power adapter is connected to the electronic device, control the power supply parameters provided by the power adapter as the working power supply of the electronic device;
[0129] Step S602: Detecting the battery of the electronic device;
[0130] Step S603: Obtaining power consumption of at least two processors in the electronic device;
[0131] Step S604: determining the first processor as a target processor, wherein the power consumption of the target processor is less than that of the second processor of the at least two processors;
[0132] Step S605: reducing the power consumption of the target processor;
[0133] Step S606: if the battery is in a discharging state, based on that the first frame rate before reducing the power consumption of the target processor and the second frame rate after reducing the power consumption of the target processor meet an adjustment condition, the power consumption of the target processor is reduced again.
[0134] Step S607: based on the first frame rate and the second frame rate not satisfying the adjustment condition, restoring the power consumption of the target processor before the current reduction, and selecting the second processor of the at least two processors as the target processor to reduce the power consumption of the target processor;
[0135] Among them, steps S601-607 are consistent with steps S501-507 in Example 5 and are not described in detail in this embodiment.
[0136] Step S608: If the battery is in a discharging state, based on the first frame rate before reducing the power consumption of the target processor and the second frame rate after reducing the power consumption of the target processor not satisfying the adjustment condition, adjusting the parameters of the adjustment condition.
[0137] Among them, when at least two processors of the electronic device are used as target processors to reduce power consumption, the battery is still in a discharging state, and the first frame rate before reducing the power consumption of the target processor and the second frame rate after reducing the power consumption of the target processor do not meet the adjustment conditions, indicating that by reducing the power consumption of each of the at least two processors in the electronic device, it is not possible to stop the battery discharging while ensuring the performance of the electronic device.
[0138] In order to stop the battery from discharging, it is necessary to adjust the adjustment parameter of the adjustment condition, wherein the adjustment parameter corresponds to the tolerance for the change of the performance of the electronic device.
[0139] Among them, in this application, by comparing the changes in the frame rate of the electronic device before and after reducing the power consumption, it is determined whether the current reduction in the power consumption of the target processor has an impact on the performance of the electronic device running the application.
[0140] The adjustment condition is that the change rate between the first frame rate and the second frame rate is not greater than a change threshold, and accordingly, the parameter of the adjustment condition is the change threshold.
[0141] Specifically, the tolerance for the change in the performance of the electronic device can be increased by increasing the parameter of the adjustment condition.
[0142] For example, the value of the change threshold is adjusted from 5% to 8%. The present application does not limit the specific value of the change threshold.
[0143] After adjusting the parameters of the adjustment condition, the process returns to loop execution of step S604 and subsequent steps to further reduce the power consumption of the electronic device until the battery stops discharging.
[0144] In summary, an information processing method provided in this embodiment further includes: if the battery is in a discharging state, based on the fact that the first frame rate before reducing the power consumption of the target processor and the second frame rate after reducing the power consumption of the target processor do not meet the adjustment condition, adjusting the parameters of the adjustment condition. In this solution, when at least two processors in the electronic device are sequentially used as target processors for power consumption reduction control, the battery is still in a discharging state, and the first frame rate before reducing the power consumption of the target processor and the second frame rate after reducing the power consumption of the target processor do not meet the adjustment condition, the parameters of the adjustment condition are adjusted to increase the tolerance for changes in the performance of the electronic device, and based on the adjusted condition parameters, the power consumption of the target processor is reduced, so as to achieve the purpose of stopping battery discharge by losing less performance of the electronic device.
[0145] like Figure 7 The flowchart shown is a seventh embodiment of an information processing method provided by the present application, and the method comprises the following steps:
[0146] Step S701: If the power adapter is connected to the electronic device, control the power supply parameters provided by the power adapter as the working power supply of the electronic device;
[0147] Step S702: Detecting the battery of the electronic device;
[0148] Step S703: Obtaining power consumption of at least two processors in the electronic device;
[0149] Step S704: determining the first processor as a target processor, wherein the power consumption of the target processor is less than that of the second processor among the at least two processors;
[0150] Step S705: reducing the power consumption of the target processor.
[0151] Among them, steps S701-705 are consistent with steps S201-205 in Example 2 and are not described in detail in this embodiment.
[0152] Step S706: If the battery is in a discharging state, adjust the parameters of the adjustment condition based on the battery power information.
[0153] The adjustment condition is used to determine whether a first frame rate before reducing the power consumption of the target processor and a second frame rate after reducing the power consumption of the target processor are satisfied.
[0154] Among them, if the battery is still in a discharging state after reducing the power consumption of the target processor multiple times, wherein the target processor may be each of at least two processors in the electronic device selected in turn, it is characterized that it is impossible to stop the battery discharging while ensuring the performance of the electronic device.
[0155] Specifically, different parameters are selected for the adjustment conditions according to different battery power information.
[0156] The battery power information is divided into multiple stages, and different parameters are set for different stages.
[0157] For example, when the battery power is 90%-100%, the change between the first frame rate and the second frame rate of the adjustment condition parameters is 2%; when the battery power is 80%-89%, the change between the first frame rate and the second frame rate of the adjustment condition parameters is 3%, and so on.
[0158] In order to stop the battery from discharging, it is necessary to adjust the adjustment parameter of the adjustment condition, wherein the adjustment parameter corresponds to the tolerance for the change of the performance of the electronic device.
[0159] Generally, the lower the battery power, the larger the corresponding parameter value, and the battery discharge should be stopped while ensuring the performance of the electronic equipment as much as possible.
[0160] In summary, the information processing method provided in this embodiment further includes: if the battery is in a discharging state, adjusting the parameters of the adjustment condition based on the battery power information. In this solution, the parameters of the adjustment condition can also be adjusted based on the battery power, and the power consumption adjustment of the target processor is more flexible in combination with the battery power situation.
[0161] like Figure 8As shown, it is a schematic diagram of an application scenario of an information processing method provided by the present application. In the application scenario, a chip A is used to execute the information processing method. The chip A can obtain the frame rate of the electronic device from the system side. The chip A can obtain the power consumption of each processor in the electronic device. The processor is represented by a GPU and a CPU. The power consumed by the processor has two sources. One is obtained from a battery through a charging circuit. The power of the battery is obtained from a power adapter. The other is obtained directly from the power adapter.
[0162] Corresponding to the above-mentioned information processing method embodiment provided by the present application, the present application also provides an apparatus embodiment applying the information processing method.
[0163] like Fig. 9 The figure shows a schematic diagram of a structure of an information processing method and device embodiment provided by the present application, the device includes the following structures: a battery 901, a power adapter interface 902 and a processing module 903;
[0164] The power adapter interface 902 is used to connect to the power adapter and receive power supply parameters provided by the power adapter;
[0165] Wherein, the processing module is connected to the battery and the power adapter interface respectively 903.
[0166] Among them, the processing module is used to control the power supply parameters provided by the power adapter as the working power supply of the electronic device if the power adapter is connected to the electronic device; detect the battery of the electronic device; if the battery is in a discharging state, adjust the operation of the electronic device based on the target strategy until the battery stops discharging.
[0167] In a specific implementation, the processing module can be implemented by a functional chip, which can obtain the charging and discharging status of the battery and the status of the power adapter interface connecting to the power adapter.
[0168] Specifically, the processing module is connected to a charging and discharging circuit, and the charging and discharging conditions of the battery can be obtained through the charging and discharging circuit.
[0169] like Fig.10 The figure shows another structural diagram of an information processing device embodiment provided by the present application, the device includes a battery 1001, a power adapter interface 1002, a processing module 1003 and two processors 1004-1005;
[0170] Among them, the Fig.10 The use of two processors in the description means at least two processors.
[0171] Wherein, at least two processors 1004-1005 are respectively connected to the processing module, and the power consumption of the at least two processors is different;
[0172] The processing module 1003 is used to: obtain power consumption in at least two processors in the electronic device; determine a first processor as a target processor, the power consumption of the target processor is less than that of a second processor in the at least two processors; and reduce the power consumption of the target processor.
[0173] Optionally, the processing module is specifically used for:
[0174] If the battery is in a discharging state, it is determined whether to reduce the power consumption of the target processor again based on a first frame rate before reducing the power consumption of the target processor and a second frame rate after reducing the power consumption of the target processor.
[0175] Optionally, the processing module is specifically used for:
[0176] Based on the first frame rate and the second frame rate satisfying the adjustment condition, the power consumption of the target processor is reduced again.
[0177] Optionally, the processing module is further used for:
[0178] Based on the fact that the first frame rate and the second frame rate do not satisfy the adjustment condition, the power consumption of the target processor is restored to the power consumption before the current reduction, and the second processor of the at least two processors is selected as the target processor to reduce the power consumption of the target processor.
[0179] Optionally, the processing module selects the second processor of the at least two processors as the target processor, and after reducing the power consumption of the target processor, is further used to:
[0180] If the battery is in a discharging state, a parameter of the adjustment condition is adjusted based on that a first frame rate before reducing the power consumption of the target processor and a second frame rate after reducing the power consumption of the target processor do not satisfy an adjustment condition.
[0181] Optionally, after reducing the power consumption of the target processor, the processing module is further configured to:
[0182] If the battery is in a discharging state, the parameters of the adjustment condition are adjusted based on the battery power information.
[0183] Among them, the functions of each structure of the information processing device refer to the corresponding explanations in the method embodiment and are not repeated in this embodiment.
[0184] In summary, the present embodiment provides an information processing device, if a power adapter is connected to an electronic device, controls the power supply parameters provided by the power adapter as the working power supply of the electronic device; detects the battery of the electronic device; if the battery is in a discharging state, adjusts the operation of the electronic device based on a target strategy until the battery stops discharging. In this solution, a target strategy is set, and when the electronic device receives the power supply parameters provided by the power adapter as the working power supply, the battery in the electronic device is in a discharging state, and the operation of the electronic device is adjusted based on the target strategy to achieve the purpose of stopping the battery discharge, ensuring that when the electronic device is connected to the power adapter, only the power provided by the power adapter is used, and the power in the battery is not consumed, thereby extending the use time of the electronic device. That is, in the above embodiment, when the power adapter is inserted, there is still battery discharge, and the power consumption adjustment strategy of multiple processors is used to stop the battery discharge as much as possible while maintaining performance.
[0185] Corresponding to the above-mentioned information processing method embodiment provided by the present application, the present application also provides an electronic device and a readable storage medium corresponding to the information processing method.
[0186] The electronic device includes: a memory and a processor;
[0187] Wherein, the memory stores a processing program;
[0188] The processor is used to load and execute the processing program stored in the memory to implement each step of the information processing method as described in any one of the above items.
[0189] For details on how to implement the information processing method of the electronic device, please refer to the aforementioned information processing method embodiments.
[0190] The readable storage medium stores a computer program thereon, and the computer program is called and executed by a processor to implement each step of the information processing method as described in any one of the above items.
[0191] Specifically, the computer program stored in the readable storage medium executes the information processing method, and reference may be made to the aforementioned information processing method embodiments.
[0192] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device provided in the embodiment, since it corresponds to the method provided in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0193] The above description of the embodiments provided enables professionals and technicians in the field to implement or use the present application. Various modifications to these embodiments will be apparent to professionals and technicians in the field, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features provided herein.
Claims
1. An information processing method, the method comprising: If the power adapter is connected to the electronic device, control the power supply parameters provided by the power adapter as the working power supply of the electronic device; Detecting a battery of the electronic device; If the battery is in a discharging state, adjusting the operation of the electronic device based on a target strategy until the battery stops discharging; If the battery is in a discharging state, adjusting the operation of the electronic device based on a target strategy until the battery stops discharging, including: Obtaining power consumption of at least two processors in the electronic device; the ratio of the power consumption of the processors to the overall power consumption of the electronic device is not less than a processor selection threshold; Determine a first processor as a target processor, wherein power consumption of the target processor is less than that of a second processor of the at least two processors; The power consumption of the target processor is reduced until the battery stops discharging.
2. The method according to claim 1, after reducing the power consumption of the target processor, further comprising: If the battery is in a discharging state, it is determined whether to reduce the power consumption of the target processor again based on a first frame rate before reducing the power consumption of the target processor and a second frame rate after reducing the power consumption of the target processor.
3. The method according to claim 2, determining whether to reduce the power consumption of the target processor again based on the first frame rate before reducing the power consumption of the target processor and the second frame rate after reducing the power consumption of the target processor, comprising: Based on the first frame rate and the second frame rate satisfying the adjustment condition, the power consumption of the target processor is reduced again.
4. The method according to claim 3, further comprising: Based on the fact that the first frame rate and the second frame rate do not satisfy the adjustment condition, the power consumption of the target processor is restored to the power consumption before the current reduction, and the second processor of the at least two processors is selected as the target processor to reduce the power consumption of the target processor.
5. The method according to claim 4, after selecting the second processor of the at least two processors as the target processor and reducing the power consumption of the target processor, further comprises: If the battery is in a discharging state, a parameter of the adjustment condition is adjusted based on that a first frame rate before reducing the power consumption of the target processor and a second frame rate after reducing the power consumption of the target processor do not satisfy an adjustment condition.
6. The method according to claim 1, after reducing the power consumption of the target processor, further comprises: If the battery is in a discharging state, the parameters of the adjustment condition are adjusted based on the battery power information.
7. An information processing device, comprising: Battery; A power adapter interface, used to connect to a power adapter and receive power supply parameters provided by the power adapter; A processing module connected to the battery and the power adapter interface respectively, for controlling the power supply parameters provided by the power adapter as the working power supply of the electronic device if the power adapter is connected to the electronic device; and detecting the battery of the electronic device; If the battery is in a discharging state, adjusting the operation of the electronic device based on a target strategy until the battery stops discharging; at least two processors respectively connected to the processing module, the at least two processors having different power consumption; a ratio of the power consumption of the processors to the overall power consumption of the electronic device being no less than a processor selection threshold; The processing module is used to: obtain power consumption in at least two processors in an electronic device; determine a first processor as a target processor, the power consumption of the target processor is less than that of a second processor in the at least two processors; and reduce the power consumption of the target processor until the battery stops discharging.
8. An electronic device, comprising: Memory, processor; Wherein, the memory stores a processing program; The processor is used to load and execute the processing program stored in the memory to implement each step of the information processing method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Power management system and method
CN1790861A