Mobile phone battery life testing method, system and storage medium based on big data
Through big data analysis of mobile phone power and environmental variables, establish a scatter plot of electricity consumption, and calculate the power consumption rate, solving the problem of insufficient power consumption data analysis in the existing technology, and improving the accuracy and efficiency of mobile phone battery life tests.
Patent Information
- Application Number
- CN202410883513.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-03
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-07-03
AI Technical Summary
The existing mobile phone battery life testing methods lack detailed power consumption data analysis without professional measurement tools, resulting in low testing efficiency and poor general use.
Using the mobile phone battery life test method based on big data, by obtaining the current power of the mobile phone, establishing a scatter plot of electricity consumption, calculating the actual power consumption rate and historical power consumption rate, outputting battery life judgment information, controlling the test environment variables, improving the analysis intelligence and accuracy.
It improves the accuracy and efficiency of mobile phone battery life tests, provides reliable energy consumption analysis without professional tools, and enhances the intelligence and universality of the test.
Smart Images

Figure CN118534347B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of mobile phone battery life detection, and in particular to a mobile phone battery life testing method, system and storage medium based on big data. Background Art
[0002] The battery life of a mobile phone refers to the standby time of the phone when it is working normally. It is related to the power consumption of the phone itself and the size of the battery capacity. When the battery capacity is the same, the smaller the power consumption, the longer the battery life. When the power consumption is the same, the larger the battery capacity, the longer the standby time. The battery life test of a mobile phone refers to the time it takes for a phone to wait to receive instructions after it is fully charged until the battery is exhausted.
[0003] Existing improvements for testing the battery life of mobile phones usually calculate and analyze the current and voltage data during the battery discharge process to improve the accuracy of the battery life test. For example, in the Chinese patent with invention publication number CN112578291A, an intelligent POS battery life test method and test system are disclosed. This solution uses professional equipment and adjusts it to a specific configuration to detect the battery discharge data, calculates and analyzes the test results, and judges the battery life. This test method requires higher test conditions, and the existing improved methods lack a method for detailed analysis of the power consumption data of the mobile phone without professional measurement tools. In view of this, it is necessary to improve the existing mobile phone battery life test method. Summary of the invention
[0004] The present invention aims to solve one of the technical problems in the prior art to at least a certain extent. By improving the mobile phone battery life test, it is used to solve the problem in the prior art that there is a lack of a method for detailed analysis of the power consumption data of the mobile phone without professional measuring tools, which leads to the need to disassemble the mobile phone when measuring the battery life of the mobile phone, resulting in low versatility of the test method and low test efficiency.
[0005] To achieve the above objectives, in a first aspect, the present invention provides a method for testing the battery life of a mobile phone based on big data, comprising:
[0006] Obtain the current power of the mobile phone, judge the current power, monitor the energy consumption based on the judgment result, and output the test energy consumption information;
[0007] Based on the test power consumption information, a power consumption scatter plot is established, multiple coordinate points in the power consumption scatter plot are calculated and analyzed, and change parameters are output based on the calculation and analysis results; the change parameters and the test power consumption information are calculated, and the actual power consumption rate is output;
[0008] Acquire multiple groups of historical power consumption rates based on the test energy consumption information, judge the test energy consumption information based on the historical power consumption rates, and output a judgment parameter based on the judgment result;
[0009] Calculate the change parameters and the judgment parameters, and output the battery life judgment value; analyze the battery life judgment value, and output the battery life judgment information based on the analysis result.
[0010] Furthermore, the current power of the mobile phone is obtained, the current power is judged, and energy consumption monitoring is performed based on the judgment result. The output test energy consumption information includes:
[0011] Execute a power determination cycle, the power determination cycle comprising:
[0012] Get the current power of the phone and determine whether the current power is equal to the maximum power;
[0013] When the judgment result is no, the power judgment cycle is repeatedly executed at the first interval;
[0014] When the judgment result is yes, the energy consumption detection information is output and the power judgment cycle is stopped;
[0015] When the energy consumption detection information is received, energy consumption detection processing is performed and test energy consumption information is output, where the test energy consumption information includes the test duration and the actual test environment.
[0016] Furthermore, the energy consumption detection process includes:
[0017] Obtaining scene settings of the mobile phone, wherein the scene settings include Bluetooth settings, location service settings, and network communication settings;
[0018] Obtain the display settings of the mobile phone, including screen brightness and volume;
[0019] Mark the combination of scene settings and display settings as the actual test environment;
[0020] Get the current time and mark it as the start time; control the energy consumption of the mobile phone, obtain the power of the mobile phone and the current time at the first interval, and mark them as the real-time power and acquisition time respectively;
[0021] The real-time power level is judged, and when the real-time power level is less than or equal to the first power level threshold, the first time is scaled by the first scaling factor; when the real-time power level is less than or equal to the second power level threshold, the current time obtained this time is marked as the end time, and the real-time power level obtained this time is marked as the shutdown power level;
[0022] The real-time power consumption is stored in a power consumption analysis database, wherein the power consumption analysis database also stores multiple groups of historical power consumption rates and historical test environments associated with the historical power consumption rates;
[0023] Calculate the difference between the end time and the start time, mark it as the test duration, and output the test duration and the actual test environment.
[0024] Furthermore, a power consumption scatter plot is established based on the test power consumption information, multiple coordinate points in the power consumption scatter plot are calculated and analyzed, and change parameters are output based on the calculation and analysis results; the change parameters and the test power consumption information are calculated, and the actual power consumption rate is output, including:
[0025] All real-time power quantities are sorted in the order of acquisition time to obtain a power quantity sequence;
[0026] A power consumption scatter plot is established with the real-time power consumption as the vertical axis and the acquisition time as the horizontal axis to obtain multiple coordinate points;
[0027] Calculate the slope of two adjacent coordinate points and mark it as the power-down slope;
[0028] Among the two points where the maximum power reduction slope is calculated, the coordinate point close to the vertical axis is marked as the left endpoint;
[0029] Calculate the difference between the start time and the acquisition time of the left endpoint, and mark it as the time before the change; calculate the difference between the test duration and the time before the change, and mark it as the time after the change;
[0030] Calculate the difference between the maximum power and the real-time power at the left endpoint, and mark it as the power consumption before the change; calculate the difference between the real-time power and the shutdown power, and mark it as the power consumption after the change;
[0031] Calculate the ratio of power consumption before the change to the time before the change, and mark it as power consumption rate before the change;
[0032] Calculate the ratio of post-change power consumption to post-change time, and mark it as post-change power consumption rate;
[0033] Calculate the ratio of the power consumption rate before the change to the power consumption rate after the change, and mark it as the judgment ratio.
[0034] Further, based on the test power consumption information, a power consumption scatter plot is established, a plurality of coordinate points in the power consumption scatter plot are calculated and analyzed, and a change parameter is output based on the calculation and analysis result; the change parameter and the test power consumption information are calculated, and the output of the actual power consumption rate also includes:
[0035] Set the initial value of the changing parameter n to empty;
[0036] When the ratio is greater than or equal to the first ratio threshold and less than or equal to the second ratio threshold, n is set to 1; when the ratio is less than the first ratio threshold or greater than the second ratio threshold, n is set to the second ratio threshold;
[0037] Use the power consumption calculation formula to calculate the changing parameters, test duration and maximum power consumption, and output the actual power consumption rate;
[0038] The power consumption calculation formula is configured as: Sv= ; Where Sv is the actual power consumption rate, Vm is the maximum power, and Tm is the test duration.
[0039] Further, based on the test energy consumption information, multiple groups of historical power consumption rates are obtained, the test energy consumption information is judged based on the historical power consumption rates, and the judgment parameters are output based on the judgment results, including:
[0040] Acquire a first number of historical power consumption rates, wherein a historical test environment associated with the historical power consumption rates is the same as an actual power consumption environment;
[0041] Grouping the random second number of historical power consumption rates into the same group, marking it as a historical group;
[0042] Mark the historical power consumption rate that is greater than the actual power consumption rate as an exceeded rate;
[0043] Set the initial value to the judgment parameter m of the number of historical groups;
[0044] The historical groups are judged. If the third number of exceeding rates exists in the historical groups, m is reduced by one. If the exceeding rate does not exist or the number of exceeding rates is less than the third number, no processing is performed.
[0045] Furthermore, the change parameter and the judgment parameter are calculated, and the output endurance judgment value includes:
[0046] Use the battery life calculation formula to calculate the change parameters and judgment parameters, and output the battery life judgment value;
[0047] The battery life calculation formula is configured as: Px=m×n; wherein Px is the battery life judgment value.
[0048] Further, the battery life judgment value is analyzed, and the battery life judgment information output based on the analysis result includes:
[0049] Compare Px with the first endurance threshold and the second endurance threshold, and when Px is less than the second endurance threshold, output good endurance information;
[0050] When Px is greater than or equal to the second endurance threshold and less than the first endurance threshold, outputting poor endurance information;
[0051] When Px is greater than or equal to the first endurance threshold, endurance fault information is output.
[0052] In a second aspect, the present invention also provides a mobile phone battery life test system based on big data, including an energy consumption detection module, an energy consumption analysis module and a battery life judgment module; the energy consumption detection module is used to obtain the current power of the mobile phone, judge the current power, perform energy consumption monitoring and processing based on the judgment result, and output test energy consumption information;
[0053] The energy consumption analysis module is used to establish a power consumption scatter diagram based on the test power consumption information, perform calculation and analysis on multiple coordinate points in the power consumption scatter diagram, and output a change parameter based on the calculation and analysis results; calculate the change parameter and the test power consumption information, and output the actual power consumption rate;
[0054] The battery life judgment module is used to obtain multiple groups of historical power consumption rates based on the test energy consumption information, judge the test energy consumption information based on the historical power consumption rates, and output a judgment parameter based on the judgment result;
[0055] It is also used to calculate the change parameters and the judgment parameters and output the battery life judgment value; analyze the battery life judgment value and output the battery life judgment information based on the analysis result.
[0056] Beneficial effects of the present invention: The present invention obtains the power of the mobile phone, starts the energy consumption detection process of a single energy consumption process when the power of the mobile phone reaches the maximum power, obtains the scene setting and display setting of the mobile phone, and calculates the actual power consumption rate; the advantage is that by obtaining the scene setting and display setting and limiting the single energy consumption process, all variables in the test process can be controlled, and when the historical power consumption rate is subsequently obtained, the historical power consumption rate with completely the same other conditions can be obtained, so that the historical power consumption rate used for analysis is sufficiently reliable, and the intelligence of energy consumption analysis is improved;
[0057] The present invention also groups the historical power consumption rates by establishing a power consumption scatter plot, and then calculates and analyzes them, outputs change parameters and judgment parameters, calculates the final battery life judgment value through the change parameters and the judgment parameters, and finally outputs the battery life judgment information based on the battery life judgment value; the advantage of this is that the actual power consumption rate calculated can be affected by calculating the change parameters, and different values of the change parameters correspond to different health states of the battery, and different health states affect the final calculated battery life judgment value; in addition, the historical power consumption rates are grouped, and the judgment parameters are obtained according to the group analysis, the judgment parameters represent the probability that the actual power consumption rate is an abnormal rate, and finally the change parameters and the judgment parameters are comprehensively analyzed to output more accurate battery life judgment information, thereby improving the accuracy of the mobile phone battery life test. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1is a functional block diagram of the system of the present invention;
[0059] Figure 2 is a flow chart of the steps of the method of the present invention;
[0060] Figure 3 It is a schematic diagram of scaling the electricity consumption scatter diagram of the present invention. DETAILED DESCRIPTION
[0061] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0062] Embodiment 1, in a first aspect, the present invention provides a mobile phone battery life test system based on big data, including an energy consumption detection module, an energy consumption analysis module and a battery life judgment module; the energy consumption detection module is used to obtain the current power of the mobile phone, judge the current power, perform energy consumption monitoring processing based on the judgment result, and output test energy consumption information;
[0063] The energy consumption detection module is configured with a power judgment strategy, which includes:
[0064] Execute the power judgment cycle, which includes:
[0065] Get the current power of the phone and determine whether the current power is equal to the maximum power;
[0066] It should be noted that obtaining the current power of the mobile phone is to obtain the percentage of the current battery power and determine whether the current power percentage is equal to 100%. This can ignore the impact of battery loss on the battery life test due to the reduction of battery capacity.
[0067] When the judgment result is no, the power judgment cycle is repeatedly executed at the first interval;
[0068] In the specific time, the first time is set to 5 minutes. The first time is a preferred option selected after comprehensive consideration of the charging rate and the discharging rate of the mobile phone. If a detailed analysis of the change in power consumption is required, the first time can be reduced accordingly.
[0069] When the judgment result is yes, the energy consumption detection information is output and the power judgment cycle is stopped.
[0070] The energy consumption detection module is also configured with energy consumption detection strategies, which include:
[0071] When receiving energy consumption detection information, perform energy consumption detection processing and output test energy consumption information, the test energy consumption information includes test duration and actual test environment;
[0072] Energy consumption detection processing includes:
[0073] Get the scene settings of the mobile phone, which include Bluetooth settings, location service settings, and network communication settings;
[0074] Get the display settings of the phone, including screen brightness and volume;
[0075] Mark the combination of scene settings and display settings as the actual test environment;
[0076] Get the current time and mark it as the start time; control the energy consumption of the mobile phone, obtain the power of the mobile phone and the current time at the first interval, and mark them as the real-time power and acquisition time respectively;
[0077] It should be noted that controlling the energy consumption of the mobile phone refers to controlling the mobile phone to continuously play videos, make calls, or control the mobile phone to be always on, etc., which is only one of the purposes of controlling the variables in the test process, and then obtaining the historical power consumption rate under the same energy consumption mode for analysis;
[0078] Each scene setting includes two states: on and off. Each display setting is specifically a percentage of the setting. For example, the phone provides 10 different levels of brightness, with brightness from low to high corresponding to levels 1 to 10. If the brightness of the phone is at level 8, the screen brightness is 80%. The same is true for the volume.
[0079] A possible actual test environment that can be finally obtained is [off, on, on, 80%, 40%], which from left to right respectively correspond to Bluetooth settings, location service settings, network communication settings, screen brightness, and volume;
[0080] The real-time power level is judged, and when the real-time power level is less than or equal to the first power level threshold, the first time is scaled by the first scaling factor; when the real-time power level is less than or equal to the second power level threshold, the current time obtained this time is marked as the end time, and the real-time power level obtained this time is marked as the shutdown power level;
[0081] In specific implementation, the first power threshold is set to 20%, the second power threshold is set to 10%, and the first zoom multiple is set to 0.2 times, which can scale the first time from 5 minutes to 1 minute, increase the acquisition frequency when the battery is low, and avoid the situation where the mobile phone consumes power too quickly and shuts down, so that no data can be obtained; if the mobile phone consumes power too quickly, for example, 20% of power is consumed per minute, the corresponding first zoom multiple is set to be smaller; on the contrary, if the power consumption rate is slow, the first multiple setting can be appropriately increased;
[0082] When the battery level of the mobile phone is less than 10%, the measurement is not continued in order to avoid the situation where the mobile phone automatically shuts down due to low battery and the data cannot be obtained;
[0083] The real-time power consumption is stored in a power consumption analysis database, where multiple groups of historical power consumption rates and historical test environments associated with the historical power consumption rates are also stored in the power consumption analysis database;
[0084] Calculate the difference between the end time and the start time, mark it as the test duration, and output the test duration and the actual test environment.
[0085] The energy consumption analysis module is used to establish a power consumption scatter diagram based on the test power consumption information, perform calculation and analysis on multiple coordinate points in the power consumption scatter diagram, and output the change parameters based on the calculation and analysis results; calculate the change parameters and the test power consumption information, and output the actual power consumption rate;
[0086] See also Figure 3 As shown, Figure 3 The coordinate point with the horizontal coordinate of 60 at the middle left end point has a real-time power of 20%. The first time needs to be scaled. In order to facilitate the display of the power consumption scatter plot after scaling, the real-time power and acquisition time obtained after scaling are displayed in another scatter plot, where the shutdown power is 9% and the termination time is 68, indicating the acquisition time from the start of the test to this moment. For example, if the energy consumption detection process starts at 13:00, the acquisition time corresponding to 68 is 14:08; the power consumption rate before the change is -1.33, and the power consumption rate after the change is -1.375. The calculated judgment ratio is 0.967. Set n=1, and the actual power consumption rate is calculated to consume 1.33% of the battery power per minute;
[0087] The energy consumption analysis module is configured with power consumption calculation strategies, which include:
[0088] All real-time power quantities are sorted in the order of acquisition time to obtain a power quantity sequence;
[0089] A power consumption scatter plot is established with the real-time power consumption as the vertical axis and the acquisition time as the horizontal axis to obtain multiple coordinate points;
[0090] Calculate the slope of two adjacent coordinate points and mark it as the power-down slope;
[0091] Among the two points where the maximum power reduction slope is calculated, the coordinate point close to the vertical axis is marked as the left endpoint;
[0092] Calculate the difference between the start time and the acquisition time of the left endpoint, and mark it as the time before the change; calculate the difference between the test duration and the time before the change, and mark it as the time after the change;
[0093] Calculate the difference between the maximum power and the real-time power at the left endpoint, and mark it as the power consumption before the change; calculate the difference between the real-time power and the shutdown power, and mark it as the power consumption after the change;
[0094] Calculate the ratio of power consumption before the change to the time before the change, and mark it as power consumption rate before the change;
[0095] Calculate the ratio of post-change power consumption to post-change time, and mark it as post-change power consumption rate;
[0096] Calculate the ratio of the power consumption rate before the change to the power consumption rate after the change, and mark it as the judgment ratio;
[0097] Set the initial value of the changing parameter n to empty;
[0098] When the ratio is greater than or equal to the first ratio threshold and less than or equal to the second ratio threshold, n is set to 1; when the ratio is less than the first ratio threshold or greater than the second ratio threshold, n is set to the second ratio threshold;
[0099] In a specific implementation, the first ratio threshold is set to 0.8, and the second ratio threshold is set to 1.2; used to determine whether there are stages of different power consumption rates when the battery consumes energy;
[0100] For a normally working battery, there is no significant difference in the power consumption rate from the start time to the end time; for an aging or faulty battery, the internal resistance of the battery may increase during the energy consumption process, and part of the power is used to generate heat through the resistor. The temperature increase will further increase the internal resistance of the battery, resulting in a significant increase in the power consumption rate.
[0101] Use the power consumption calculation formula to calculate the changing parameters, test duration and maximum power consumption, and output the actual power consumption rate;
[0102] The power consumption calculation formula is configured as: Sv= ; Where Sv is the actual power consumption rate, Vm is the maximum power, and Tm is the test duration;
[0103] It should be noted that based on the setting method of n, when the battery power consumption rate is uniform and changes slightly, n=1, which has no effect on the calculation of the actual power consumption rate; when there are stages with different power consumption rates, n is 1.2, the calculated Sv will become larger, thereby increasing the battery life judgment value Px.
[0104] The battery life judgment module is used to obtain multiple groups of historical power consumption rates based on the test energy consumption information, judge the test energy consumption information based on the historical power consumption rates, and output judgment parameters based on the judgment results; it is also used to calculate the change parameters and the judgment parameters, and output the battery life judgment value; analyze the battery life judgment value, and output the battery life judgment information based on the analysis results;
[0105] The battery life judgment module is configured with a historical analysis strategy, which includes:
[0106] Acquire a first number of historical power consumption rates, wherein a historical test environment associated with the historical power consumption rates is the same as an actual power consumption environment;
[0107] It should be noted that the historical power consumption rates are all obtained after battery life tests, and the test results are the results of mobile phone battery tests with normal battery life;
[0108] Grouping the random second number of historical power consumption rates into the same group, marking it as a historical group;
[0109] Mark the historical power consumption rate that is greater than the actual power consumption rate as an exceeded rate;
[0110] Set the initial value to the judgment parameter m of the number of historical groups;
[0111] Judging the historical groups, if there is a third number of exceeding rates in the historical groups, m is reduced by one; if there is no exceeding rate or the number of exceeding rates is less than the third number, no processing is performed;
[0112] In specific implementation, the first number is set to 1000, the second number is set to 10, and the third number is set to 1, at this time m=1000 / 10=100; 100 historical groups can be obtained; the first number is set to 1000 in order to have enough data to support the analysis results; for any historical group, if there is more than one historical power consumption rate greater than the actual power consumption rate in the historical group, it means that in the case of the historical group, the actual power consumption rate is normal;
[0113] The battery life judgment module is also configured with a battery life judgment strategy, which includes:
[0114] Use the battery life calculation formula to calculate the change parameters and judgment parameters, and output the battery life judgment value;
[0115] The battery life calculation formula is configured as: Px=m×n; where Px is the battery life judgment value;
[0116] In a specific implementation, the first endurance threshold is set to 72, and the second endurance threshold is set to 60;
[0117] The first battery life threshold is the result calculated when m is 70 and n is 1.2. When m is 70, it means that in 70% of the historical groups, the actual power consumption rate is abnormal. When n is 1.2, it means that the power consumption rate of the battery changes significantly during the power consumption process. Combining m and n, it is judged that there is a battery life failure at this time.
[0118] The second endurance threshold is the result calculated when m is 50 and n is 1.2. At this time, there is a 50% probability that the actual power consumption rate is abnormal, and the power consumption rate of the battery changes significantly during the power consumption process. Combining m and n, it is judged that the endurance is poor at this time;
[0119] Compare Px with the first endurance threshold and the second endurance threshold, and when Px is less than the second endurance threshold, output good endurance information;
[0120] When Px is greater than or equal to the second endurance threshold and less than the first endurance threshold, outputting poor endurance information;
[0121] When Px is greater than or equal to the first endurance threshold, endurance fault information is output.
[0122] Example 2, second aspect, please refer to Figure 2 As shown, the present invention also provides a mobile phone battery life testing method based on big data, including:
[0123] Step S1, obtaining the current power of the mobile phone, judging the current power, performing energy consumption monitoring based on the judgment result, and outputting the test energy consumption information; Step S1 also includes the following sub-steps:
[0124] Step S101, executing a power determination cycle, the power determination cycle includes:
[0125] Get the current power of the phone and determine whether the current power is equal to the maximum power;
[0126] When the judgment result is no, the power judgment cycle is repeatedly executed at the first interval;
[0127] When the judgment result is yes, the energy consumption detection information is output and the power judgment cycle is stopped;
[0128] Step S102, when energy consumption detection information is received, energy consumption detection processing is performed and test energy consumption information is output, where the test energy consumption information includes test duration and actual test environment.
[0129] Step S102 includes the following sub-steps:
[0130] Step S10201, obtaining the scene settings of the mobile phone, the scene settings including Bluetooth settings, location service settings and network communication settings;
[0131] Step S10202, obtaining the display settings of the mobile phone, the display settings including screen brightness and volume;
[0132] Step S10203, marking the combination of the scene setting and the display setting as an actual test environment;
[0133] Step S10204, obtaining the current time and marking it as the start time; controlling the mobile phone to consume energy, obtaining the power of the mobile phone and the current time once every first time interval, marking them as the real-time power and the acquisition time respectively;
[0134] Step S10205, judging the real-time power level, when the real-time power level is less than or equal to the first power level threshold, scaling the first time by a first scaling factor; when the real-time power level is less than or equal to the second power level threshold, marking the current time obtained this time as the end time, and marking the real-time power level obtained this time as the shutdown power level;
[0135] Step S10206, storing the real-time power consumption in a power consumption analysis database, wherein the power consumption analysis database also stores multiple groups of historical power consumption rates and historical test environments associated with the historical power consumption rates;
[0136] Step S10207, calculate the difference between the end time and the start time, mark it as the test duration, and output the test duration and the actual test environment.
[0137] Step S2, establishing a power consumption scatter plot based on the test power consumption information, performing calculation and analysis on multiple coordinate points in the power consumption scatter plot, and outputting a change parameter based on the calculation and analysis result; calculating the change parameter and the test power consumption information, and outputting an actual power consumption rate; Step S2 also includes the following sub-steps:
[0138] Step S2011, sorting all the real-time power quantities in the order of acquisition time to obtain a power quantity sequence;
[0139] Step S2012, establishing a power consumption scatter plot with the real-time power consumption as the vertical axis and the acquisition time as the horizontal axis to obtain a plurality of coordinate points;
[0140] Step S2013, calculating the slope of two adjacent coordinate points, and marking it as the power-down slope;
[0141] Step S2014, of the two points where the maximum power reduction slope is calculated, the coordinate point close to the vertical axis is marked as the left endpoint; the difference between the start time and the acquisition time of the left endpoint is calculated, marked as the pre-change time; the difference between the test duration and the pre-change time is calculated, marked as the post-change time;
[0142] Step S2015, calculating the difference between the maximum power and the real-time power of the left endpoint, marking it as the power consumption before the change; calculating the difference between the real-time power and the shutdown power, marking it as the power consumption after the change;
[0143] Step S2016, calculating the ratio of the power consumption before the change to the time before the change, marked as the power consumption rate before the change; calculating the ratio of the power consumption after the change to the time after the change, marked as the power consumption rate after the change;
[0144] Step S2017, calculate the ratio of the power consumption rate before the change to the power consumption rate after the change, and mark it as the judgment ratio.
[0145] Step S2021, setting the change parameter n with an initial value of null;
[0146] Step S2022, when it is determined that the ratio is greater than or equal to the first ratio threshold and less than or equal to the second ratio threshold, n is set to 1; when it is determined that the ratio is less than the first ratio threshold or greater than the second ratio threshold, n is set to the second ratio threshold;
[0147] Step S2023, using the power consumption calculation formula to calculate the change parameter, test duration and maximum power consumption, and output the actual power consumption rate;
[0148] The power consumption calculation formula is configured as: Sv= ; Where Sv is the actual power consumption rate, Vm is the maximum power, and Tm is the test duration.
[0149] Step S3, obtaining multiple groups of historical power consumption rates based on the test energy consumption information, judging the test energy consumption information based on the historical power consumption rates, and outputting a judgment parameter based on the judgment result; Step S3 also includes the following sub-steps:
[0150] Step S301, obtaining a first number of historical power consumption rates, wherein a historical test environment associated with the historical power consumption rates is the same as an actual energy consumption environment;
[0151] Step S302, grouping a random second number of historical power consumption rates into the same group, marking it as a historical group;
[0152] Step S303, marking the historical power consumption rate that is greater than the actual power consumption rate as an excess rate;
[0153] Step S304, setting the initial value to the determination parameter m of the number of historical groups;
[0154] Step S305, judging the historical groups, if there is a third number of exceeding rates in the historical groups, m is reduced by one; if there is no exceeding rate or the number of exceeding rates is less than the third number, no processing is performed.
[0155] Step S4, calculating the change parameter and the judgment parameter, and outputting the endurance judgment value; analyzing the endurance judgment value, and outputting the endurance judgment information based on the analysis result; Step S4 also includes the following sub-steps:
[0156] Step S401, using a battery life calculation formula to calculate the change parameter and the judgment parameter, and outputting a battery life judgment value;
[0157] The battery life calculation formula is configured as: Px=m×n; where Px is the battery life judgment value.
[0158] Step S402, comparing Px with the first endurance threshold and the second endurance threshold, and when Px is less than the second endurance threshold, outputting good endurance information;
[0159] When Px is greater than or equal to the second endurance threshold and less than the first endurance threshold, outputting poor endurance information;
[0160] When Px is greater than or equal to the first endurance threshold, endurance fault information is output.
[0161] Embodiment 3, third aspect, the present application provides a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the above method are executed. Through the above technical scheme, when the computer program is executed by the processor, the method in any optional implementation of the above embodiment is executed to achieve the following functions: obtain the current power of the mobile phone, perform energy consumption monitoring and processing, and output test energy consumption information; establish a power consumption scatter plot, output change parameters; calculate the change parameters and test power consumption information, and output the actual power consumption rate; obtain multiple groups of historical power consumption rates, and output judgment parameters; calculate the change parameters and judgment parameters, and output the battery life judgment value; analyze the battery life judgment value, and output the battery life judgment information.
[0162] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0163] It should be understood by those skilled in the art that the embodiments of the present invention may be provided as methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program codes. Among them, the storage medium may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read Only Memory, referred to as EPROM), programmable read-only memory (Programmable Read-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic memory, flash memory, magnetic disk or optical disk. These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0164] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
Claims
1. A mobile phone battery life test method based on big data, characterized in that: include: Obtain the current power of the mobile phone, judge the current power, monitor the energy consumption based on the judgment result, and output the test energy consumption information; A power consumption scatter plot is established with the real-time power consumption as the vertical axis and the acquisition time as the horizontal axis, multiple coordinate points in the power consumption scatter plot are calculated and analyzed, and change parameters are output based on the calculation and analysis results; Calculate the changing parameters and test energy consumption information, and output the actual power consumption rate; Acquire a first number of historical power consumption rates, wherein a historical test environment associated with the historical power consumption rates is the same as an actual power consumption environment; Grouping the random second number of historical power consumption rates into the same group, marking it as a historical group; Mark the historical power consumption rate that is greater than the actual power consumption rate as an exceeded rate; Set the initial value to the judgment parameter m of the number of historical groups; Calculate the change parameters and the judgment parameters, and output the battery life judgment value; analyze the battery life judgment value, and output the battery life judgment information based on the analysis result.
2. The method for testing the battery life of a mobile phone based on big data according to claim 1, characterized in that: Get the current power of the mobile phone, judge the current power, monitor the energy consumption based on the judgment result, and output the test energy consumption information including: Execute a power determination cycle, the power determination cycle comprising: Get the current power of the phone and determine whether the current power is equal to the maximum power; When the judgment result is no, the power judgment cycle is repeatedly executed at the first interval; When the judgment result is yes, the energy consumption detection information is output and the power judgment cycle is stopped; When the energy consumption detection information is received, energy consumption monitoring processing is performed to output test energy consumption information, where the test energy consumption information includes the test duration and the actual test environment.
3. The mobile phone battery life testing method based on big data according to claim 2 is characterized in that: The energy consumption monitoring process includes: Obtaining scene settings of the mobile phone, wherein the scene settings include Bluetooth settings, location service settings, and network communication settings; Obtain the display settings of the mobile phone, including screen brightness and volume; Mark the combination of scene settings and display settings as the actual test environment; Get the current time and mark it as the start time; control the energy consumption of the mobile phone, obtain the power of the mobile phone and the current time at the first interval, and mark them as the real-time power and acquisition time respectively; The real-time power level is judged, and when the real-time power level is less than or equal to the first power level threshold, the first time is scaled by the first scaling factor; when the real-time power level is less than or equal to the second power level threshold, the current time obtained this time is marked as the end time, and the real-time power level obtained this time is marked as the shutdown power level; The real-time power consumption is stored in a power consumption analysis database, wherein the power consumption analysis database also stores multiple groups of historical power consumption rates and historical test environments associated with the historical power consumption rates; Calculate the difference between the end time and the start time, mark it as the test duration, and output the test duration and the actual test environment.
4. The method for testing the battery life of a mobile phone based on big data according to claim 3, characterized in that: A power consumption scatter plot is established with the real-time power consumption as the vertical axis and the acquisition time as the horizontal axis, multiple coordinate points in the power consumption scatter plot are calculated and analyzed, and change parameters are output based on the calculation and analysis results; Calculate the changing parameters and test energy consumption information, and output the actual power consumption rate including: All real-time power quantities are sorted in the order of acquisition time to obtain a power quantity sequence; A power consumption scatter plot is established with the real-time power consumption as the vertical axis and the acquisition time as the horizontal axis to obtain multiple coordinate points; Calculate the slope of two adjacent coordinate points and mark it as the power-down slope; Among the two points where the maximum power reduction slope is calculated, the coordinate point close to the vertical axis is marked as the left endpoint; Calculate the difference between the start time and the acquisition time of the left endpoint, and mark it as the time before the change; calculate the difference between the test duration and the time before the change, and mark it as the time after the change; Calculate the difference between the maximum power and the real-time power at the left endpoint, and mark it as the power consumption before the change; calculate the difference between the real-time power and the shutdown power, and mark it as the power consumption after the change; Calculate the ratio of power consumption before the change to the time before the change, and mark it as power consumption rate before the change; Calculate the ratio of post-change power consumption to post-change time, and mark it as post-change power consumption rate; Calculate the ratio of the power consumption rate before the change to the power consumption rate after the change, and mark it as the judgment ratio.
5. The method for testing the battery life of a mobile phone based on big data according to claim 4, characterized in that: A power consumption scatter plot is established with the real-time power consumption as the vertical axis and the acquisition time as the horizontal axis, multiple coordinate points in the power consumption scatter plot are calculated and analyzed, and change parameters are output based on the calculation and analysis results; Calculate the changing parameters and test energy consumption information, and output the actual power consumption rate including: Set the initial value of the changing parameter n to empty; When the ratio is greater than or equal to the first ratio threshold and less than or equal to the second ratio threshold, n is set to 1; when the ratio is less than the first ratio threshold or greater than the second ratio threshold, n is set to the second ratio threshold; Use the power consumption calculation formula to calculate the changing parameters, test duration and maximum power consumption, and output the actual power consumption rate; The power consumption calculation formula is configured as: Sv= ; Where Sv is the actual power consumption rate, Vm is the maximum power, and Tm is the test duration.
6. The method for testing the battery life of a mobile phone based on big data according to claim 5, characterized in that: After setting the initial value of the judgment parameter m of the number of historical groups, it also includes: The historical groups are judged. If the third number of exceeding rates exists in the historical groups, m is reduced by one. If the exceeding rate does not exist or the number of exceeding rates is less than the third number, no processing is performed.
7. The method for testing the battery life of a mobile phone based on big data according to claim 6, characterized in that: The change parameters and judgment parameters are calculated, and the output endurance judgment value includes: Use the battery life calculation formula to calculate the change parameters and judgment parameters, and output the battery life judgment value; The battery life calculation formula is configured as: Px=m×n; wherein Px is the battery life judgment value.
8. The method for testing the battery life of a mobile phone based on big data according to claim 7, characterized in that: The battery life judgment information includes good battery life information, poor battery life information and battery life failure information. The battery life judgment value is analyzed, and the battery life judgment information is output based on the analysis result, including: Compare Px with the first endurance threshold and the second endurance threshold, and when Px is less than the second endurance threshold, output good endurance information; When Px is greater than or equal to the second endurance threshold and less than the first endurance threshold, output endurance poor information; When Px is greater than or equal to the first endurance threshold, endurance fault information is output.
9. A mobile phone battery life test system based on big data, applicable to the mobile phone battery life test method based on big data according to any one of claims 1 to 8, characterized in that: It includes an energy consumption detection module, an energy consumption analysis module and a battery life judgment module; the energy consumption detection module is used to obtain the current power of the mobile phone, judge the current power, perform energy consumption monitoring based on the judgment result, and output the test energy consumption information; The energy consumption analysis module is used to establish an electricity consumption scatter diagram based on the test energy consumption information, perform calculation and analysis on multiple coordinate points in the electricity consumption scatter diagram, and output a change parameter based on the calculation and analysis results; Calculate the changing parameters and test energy consumption information, and output the actual power consumption rate; The battery life judgment module is used to obtain multiple groups of historical power consumption rates based on the test energy consumption information, judge the test energy consumption information based on the historical power consumption rates, and output a judgment parameter based on the judgment result; It is also used to calculate the change parameters and judgment parameters and output the endurance judgment value; The battery life judgment value is analyzed, and battery life judgment information is output based on the analysis result.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are executed.
Citation Information
Patent Citations
Intelligent POS endurance test method and system
CN112578291A
Terminal endurance testing system and terminal endurance testing method
CN105467329A
Charging reminding method and apparatus, storage medium, and terminal
CN109361818A