A portable WIFI battery power detection method, device, electronic device and readable storage medium
By obtaining the power change curve of the portable WIFI and the power consumption of external devices, the actual power of the battery is calculated, and the problem of inaccurate power detection is solved, and the accuracy and efficiency of power display are improved.
Patent Information
- Application Number
- CN202411154654.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-08-22
AI Technical Summary
The inaccurate battery detection of portable WIFI causes the battery display to jump, affecting the user experience.
By obtaining the battery capacity change curve of the battery capacity and charging time at ambient temperature, combining the power consumption of external devices, the actual battery capacity and remaining battery capacity of the battery are calculated, avoiding consideration of battery temperature and voltage, and improving the accuracy and efficiency of power detection.
While ensuring the accuracy of battery display, it improves the efficiency of battery capacity detection and solves the problems of inaccurate and instability of battery display.
Smart Images

Figure CN118671626B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a method, device, electronic device and readable storage medium for detecting battery power of a portable WIFI. Background Art
[0002] With the rapid development of mobile Internet, people are becoming more and more dependent on the Internet. Whether on business trips, vacations, or in daily life, people hope to access the Internet anytime and anywhere and enjoy convenient network services. Portable WIFI, as a new type of mobile network device, came into being in this context.
[0003] When the portable WIFI is used as a wireless base station to connect multiple devices to the Internet, its power consumption is relatively fast. If it is used to charge other devices such as mobile phones, the power consumption will be further accelerated, which will affect the continuity of the WIFI connection. Traditional portable WIFI comes with a lithium battery and has a power bank function. There are two types of power display: one is the indicator light or box segment display, which is generally divided into 4 segments, and the other is the digital percentage display, 0~100%. Regardless of the method, there are problems of inaccurate and unstable display, which is specifically manifested in abnormal jumping. For example, the power display during charging should continue to increase, and during discharging, it should continue to decrease. However, in fact, whether charging or discharging, sometimes the power level will fluctuate, which makes users mistakenly believe that the product is faulty. Summary of the invention
[0004] The present application provides a battery power detection method, device, electronic device and readable storage medium for a portable WIFI, which can at least solve the problem of inaccurate battery power detection of portable WIFI causing battery power display to jump in the related art.
[0005] A first aspect of an embodiment of the present application provides a method for detecting battery power of a portable WIFI, comprising:
[0006] Get the battery power change curve of the portable WIFI and the charging time under the current ambient temperature;
[0007] Determine the actual power of the battery of the portable WIFI according to the power change curve and the charging time;
[0008] Detecting the power consumption of the portable WIFI when an external device is connected to the portable WIFI;
[0009] The remaining power of the battery is determined according to the actual power and the power consumption.
[0010] By adopting the above scheme, the actual power of the battery is determined by the voltage change when the battery of the portable WIFI is charged, and during the connection process between the portable WIFI and the external device, there is no need to consider the temperature and voltage of the battery, and the remaining power of the battery is directly determined by the power consumption of the external device connected to the portable WIFI, thereby ensuring the accuracy of the power display and improving the detection efficiency of the battery power.
[0011] Optionally, the step of obtaining a battery power change curve of the portable WIFI battery power and charging time at the current ambient temperature includes:
[0012] Obtaining a mapping relationship between the battery voltage and the battery power of the portable WIFI at the current ambient temperature;
[0013] Determine a change value of the battery voltage within the charging time according to the mapping relationship;
[0014] The battery capacity variation curve between the battery capacity and the charging time is determined according to the variation value of the battery voltage.
[0015] By adopting the above scheme, the change of the battery power in the corresponding charging time is determined according to the change value of the battery voltage and the corresponding mapping relationship, and the power change curve between the battery power and the charging time is determined, thereby improving the accuracy of the power change curve.
[0016] Optionally, the step of obtaining a mapping relationship between the battery voltage and the battery power at the current ambient temperature includes:
[0017] Acquire battery parameters at different ambient temperatures; wherein the battery parameters include the battery power and the battery voltage;
[0018] Building a power calculation model according to the battery parameters at the different ambient temperatures;
[0019] Calibrate the power calculation model according to the test parameters corresponding to the battery parameters;
[0020] After the power calculation model is calibrated, the battery power corresponding to the battery voltage at the current ambient temperature is obtained, and a mapping relationship between the battery voltage and the battery power is determined.
[0021] By adopting the above scheme, other data of battery parameters at different ambient temperatures are selected as test parameters to calibrate the power calculation model. After the calibration, the current ambient temperature is input into the power calculation model to obtain the mapping relationship between the corresponding battery voltage and battery power, thereby improving the accuracy of power calculation.
[0022] Optionally, the step of detecting the power consumption of the portable WIFI when an external device is connected to the portable WIFI includes:
[0023] Obtaining the connection duration of the external device and corresponding traffic usage information;
[0024] The power consumption of the external device is determined by substituting the connection duration and the corresponding traffic usage information into a preset power consumption calculation formula.
[0025] Optionally, the step of determining the power consumption of the external device by substituting the connection duration and the corresponding traffic usage information into a preset power consumption calculation formula includes:
[0026] The power consumption is calculated by the preset power consumption calculation formula:
[0027] ,
[0028] Among them, Wh is the power consumption, i is the number of external device connections, i= 1,2,3...n, Ti is the connection time of the i-th external device, k1 is the power consumption coefficient corresponding to the connection time, k2 is the flow power consumption coefficient, f (i) Traffic usage information.
[0029] Optionally, the step of determining the remaining power of the battery according to the actual power and the power consumption includes:
[0030] Acquire the target ambient temperature and the target battery voltage during the power consumption detection;
[0031] Substituting the target ambient temperature and the target battery voltage into the power calculation model to determine the target battery power;
[0032] Determine whether the difference between the actual power and the power consumption, and the deviation value between the target battery power are less than a preset threshold;
[0033] If the deviation value is less than the preset threshold, the difference is determined to be the remaining power of the battery.
[0034] By adopting the above scheme, the calculated difference is compared with the target battery power obtained by the circuit calculation model to determine the difference between the actual power and the power consumption. The difference is used to determine whether the power consumption calculated by the power calculation model is accurate, thereby improving the accuracy of the remaining power detection.
[0035] Optionally, the method further includes:
[0036] Obtaining historical charging time and historical charging parameters of the battery in a corresponding power range;
[0037] Determine whether the current charging parameters are consistent with the historical charging parameters;
[0038] If the current charging parameter is consistent with the historical charging parameter, the charging power of the current charging duration is determined within the power range according to the historical charging duration.
[0039] By adopting the above solution, within the same charging interval, the charging capacity of the current charging time is determined according to the historical charging time, thereby improving the display efficiency of the battery charging capacity.
[0040] A second aspect of an embodiment of the present application provides a battery power detection device for a portable WIFI, comprising:
[0041] An acquisition module is used to obtain a battery change curve of the portable WIFI battery power and charging time under the current ambient temperature;
[0042] A first determining module, used to determine the actual power of the battery according to the power change curve and the charging time;
[0043] A detection module, used to detect the power consumption of the portable WIFI when an external device is connected to the portable WIFI;
[0044] The second determining module is used to determine the remaining power of the battery according to the actual power and the power consumption.
[0045] A third aspect of an embodiment of the present application provides an electronic device, including a memory and a processor, wherein the processor is used to execute a computer program stored in the memory, and when the processor executes the computer program, the steps of the battery power detection method for the portable WIFI provided in the first aspect of the embodiment of the present application are implemented.
[0046] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, each step of the battery power detection method for a portable WIFI provided in the first aspect of the embodiment of the present application is implemented.
[0047] In summary, the beneficial effects of this application are:
[0048] 1. When the battery of the portable WIFI is charged, the actual power of the battery is determined by the voltage change. When the portable WIFI is connected to an external device, there is no need to consider the temperature and voltage of the battery. The remaining power of the battery is directly determined by the power consumption of the external device connected to the portable WIFI. While ensuring the accuracy of the power display, the detection efficiency of the battery power is improved.
[0049] 2. Select other data of battery parameters at different ambient temperatures as test parameters to calibrate the power calculation model. After the calibration, input the current ambient temperature into the power calculation model to obtain the mapping relationship between the corresponding battery voltage and battery power, thereby improving the accuracy of power calculation. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 A flowchart of a method for detecting battery power of a portable WIFI provided in an embodiment of the present application;
[0051] Figure 2 A schematic diagram of a program module of a battery power detection device for a portable WIFI provided in an embodiment of the present application;
[0052] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0053] In order to make the purpose, features, and advantages of the invention of this application more obvious and easy to understand, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0054] In order to solve the problem of inaccurate battery detection of portable WIFI in the related art causing battery display to jump, the embodiment of the present application provides a battery detection method for portable WIFI, such as Figure 1 The present invention provides a flow chart of a method for detecting the battery power of a portable WIFI. The method for detecting the battery power of a portable WIFI includes the following steps:
[0055] Step 110: Obtain a battery power variation curve of the portable WIFI and the charging time under the current ambient temperature.
[0056] Specifically, in actual applications, when the power of the portable WIFI is detected and displayed, the remaining power of the portable WIFI is usually determined by detecting the voltage of the battery of the portable WIFI. The battery of the portable WIFI is usually a lithium battery, which is greatly affected by the ambient temperature. In a low temperature environment, the internal resistance of the lithium battery increases, resulting in a decrease in the detected voltage, and the detected remaining power also decreases accordingly. Therefore, when the temperature changes, it is easy to cause the power display to jump. Therefore, in this embodiment, the influence of the ambient temperature is taken into account from the charging stage, and the power change curve of the battery power with the charging time is determined. It should be understood that the power change curve is the charging data obtained after multiple charging tests and at different ambient temperatures, and the power change curve of the battery power with the charging time at the same ambient temperature is obtained based on the charging data.
[0057] Step 120: determine the actual power of the battery of the portable WIFI according to the power change curve and the charging time.
[0058] Specifically, in this embodiment, the corresponding power change curve is determined according to the detected ambient temperature, and the actual power under the corresponding power change curve is determined according to the charging time under the current ambient temperature. For example, the current remaining power of the battery is 10%, and the ambient temperature is 20°C, then the corresponding power change curve is the first power change curve. After charging for two minutes, it is determined according to the first power change curve that the actual power of the current battery is 30%, and the ambient temperature has risen to 25°C at this time. Then, according to the second power change curve corresponding to 25°C, the actual power increased by the corresponding charging time is calculated starting from the actual power of 30%.
[0059] Step 130, detecting the power consumption of the portable WIFI when an external device is connected to the portable WIFI;
[0060] Step 140: Determine the remaining power of the battery according to the actual power and power consumption.
[0061] Specifically, in actual applications, the main function of the portable WIFI is to provide a wireless network for external devices (including but not limited to smart mobile terminals, such as mobile phones, computers, etc.). First, the external device needs to connect to the portable WIFI through a preset password. After the password is verified, the portable WIFI provides a wireless network for the external device. In the connection state and the process of the external device using the data flow, the power of the portable WIFI will be continuously consumed. Therefore, in this embodiment, the detection of the remaining power of the portable WIFI can be carried out by detecting the power consumption of the external device, and the remaining power of the battery can be determined by subtracting the power consumption of the external device from the actual power of the battery. It should be understood that in the process of detecting the remaining power, the portable WIFI still has self-consumed power, but the power consumed when the portable WIFI is not in use can be ignored compared with the power consumption in the working state.
[0062] In an optional implementation of the present embodiment, the step of obtaining a battery power change curve of the portable WIFI at the current ambient temperature and the charging time includes: obtaining a mapping relationship between the battery voltage and the battery power of the portable WIFI at the current ambient temperature; determining a change value of the battery voltage during the charging time according to the mapping relationship; and determining a battery power change curve of the battery power and the charging time according to the change value of the battery voltage.
[0063] Specifically, in practical applications, there is a certain mapping relationship between the battery voltage and the battery power. For example, the calculation formula between the battery voltage and the battery power is:
[0064] ,
[0065] Among them, Q is the battery capacity, C is the equivalent capacitance of the battery, and U is the battery voltage. It can be seen that when the battery voltage is 4.2V, the battery capacity is Q=4.2C.
[0066] Therefore, in this embodiment, to detect the actual battery power, it is only necessary to determine the battery voltage. First, it is necessary to obtain the mapping relationship between the battery voltage and the battery power at the current ambient temperature. As the charging time increases, the battery power also increases. Correspondingly, the detected battery voltage will also increase continuously. Therefore, the change value of the battery voltage during the charging time is determined. According to the change value of the battery voltage and the corresponding mapping relationship, the change amount of the battery power during the corresponding charging time can be determined. The charging process is tested multiple times to determine the power change curve between the battery power and the charging time.
[0067] In this embodiment, the step of obtaining a mapping relationship between a battery voltage and a battery power at a current ambient temperature includes: obtaining battery parameters at different ambient temperatures; wherein the battery parameters include a battery power and a battery voltage; constructing a power calculation model according to the battery parameters at different ambient temperatures; calibrating the power calculation model according to test parameters corresponding to the battery parameters; after the power calculation model is calibrated, obtaining a mapping relationship between the battery voltage and the battery power at the current ambient temperature.
[0068] Specifically, in practical applications, the battery voltage is affected by the internal resistance of the battery. When the ambient temperature rises, the internal resistance decreases, and when the ambient temperature decreases, the internal resistance increases. Therefore, as the ambient temperature changes, the detection of the battery voltage is also affected, resulting in inaccurate calculation of the battery power. In this embodiment, the battery parameters at different ambient temperatures are obtained, wherein the battery parameters include but are not limited to the battery power, battery voltage, battery internal resistance and ambient temperature. It should be understood that under the existing precision measuring instruments, the change in the battery parameters at different ambient temperatures is determined by controlling the ambient temperature, and a suitable mathematical model is selected according to the change in the battery parameters to construct a power calculation model. For example, the parameter characteristics of the battery parameters at different battery temperatures are determined, and a suitable mathematical model (neural network model, etc.) is selected according to the parameter characteristics. The battery parameters are divided into a training set and a validation set, and the selected model is trained through the training set, and the performance of the model is evaluated using the validation set. If the data of the validation set can be calculated by the model, it is determined that the power calculation model is constructed. In order to ensure the accuracy of the power calculation model, other data of battery parameters at different ambient temperatures are selected as test parameters to calibrate the power calculation model. After the calibration, the current ambient temperature is input into the power calculation model to obtain the corresponding mapping relationship between the battery voltage and the battery power.
[0069] It should be understood that if the portable WIFI is still in use during the charging process, the power display of the portable WIFI also needs to calculate the power consumption of the external device, and the actual power of the portable WIFI is deducted from the charging power.
[0070] In an optional implementation of the present embodiment, the step of detecting the power consumption of the portable WIFI when an external device is connected to the portable WIFI includes: obtaining the connection duration of the external device and the corresponding traffic usage information; and determining the power consumption of the external device by substituting the connection duration and the corresponding traffic usage information into a preset power consumption calculation formula.
[0071] Specifically, in actual applications, the power consumption relationship between the portable WIFI and the external device mainly depends on the data transmission volume and the connection time. The larger the data transmission volume, the more power consumption will usually be. The longer the use time, the more power consumption will usually be. Therefore, in this embodiment, when a connection request sent by an external device to the portable WIFI is detected, after the password verification is passed and the connection is established, the connection time between the external device and the portable WIFI and the traffic usage information of the external device (including but not limited to the specific traffic value) are obtained, and the power consumption of the external device is determined by substituting the connection time and the corresponding traffic usage information into the preset power consumption calculation formula. It should be understood that the preset power consumption calculation formula is:
[0072] ,
[0073] Among them, Wh is the power consumption, i is the number of external device connections, i= 1,2,3...n, Ti is the connection time of the i-th external device, k1 is the power consumption coefficient corresponding to the connection time, k2 is the flow power consumption coefficient, f (i) It is the traffic usage information. It should be understood that the power consumption coefficient of the connection duration and the traffic power consumption coefficient are determined by the performance of the portable WIFI (device model, power, etc.). represents the power consumption generated by the connection time of the i-th external device, It represents the power consumption corresponding to the traffic used by the i-th external device, and the total power consumption generated by the n external devices connected to the portable WIFI is calculated by the summation formula.
[0074] In an optional implementation of the present embodiment, the step of determining the remaining battery power based on the actual power consumption and the power consumption includes: obtaining the target ambient temperature and the target battery voltage during the power consumption detection; substituting the target ambient temperature and the target battery voltage into the power calculation model to determine the target battery power; judging whether the difference between the actual power consumption and the power consumption and the deviation value between the actual power and the target battery power are less than a preset threshold; if the deviation value is less than the preset threshold, determining the difference to be the remaining battery power.
[0075] Specifically, in the present embodiment, during the power consumption detection process, the current target ambient temperature and target battery voltage of the portable WIFI are obtained in real time, the target ambient temperature and the target battery voltage are substituted into the above-mentioned power calculation model, and the real-time target battery power is calculated. When the current power consumption of the external device is determined, the difference between the actual power and the power consumption of the portable WIFI is calculated. The difference can be understood as the remaining power of the portable WIFI. However, in order to improve the accuracy of the remaining power detection, it is also necessary to compare the calculated difference with the target battery power obtained by the circuit calculation model, and judge the difference between the actual power and the power consumption, and the deviation value from the target battery power. If the deviation value is less than the preset threshold value, it is determined that the difference between the actual power and the power consumption is the remaining power of the portable WIFI, and the remaining power is displayed.
[0076] It should be understood that, although during the use of the portable WIFI, both the power calculation model and the power consumption calculation formula can calculate the remaining power of the portable WIFI, the power calculation model still needs to detect the temperature and voltage of the battery during the calculation process, while the power consumption of the portable WIFI can be directly calculated through the power consumption calculation formula, and the corresponding remaining power can be further obtained. The calculation efficiency of the remaining power is slightly higher than the calculation efficiency through the power calculation model. Due to the power consumption of the portable WIFI itself, when the difference between the actual power and the power consumption, and the deviation value from the target battery power is greater than the preset threshold, it is determined that the power consumption of the portable WIFI itself is too large, and the historical static power consumption of the portable WIFI when it is not connected to the external device is obtained, and the current power consumption of the portable WIFI itself is determined according to the mapping relationship between the historical static power consumption and the static time, and the remaining power of the battery is determined according to the power consumption of the portable WIFI itself and the power consumption of the external device.
[0077] Optionally, in practical applications, the portable WIFI has the function of predicting the charging time during the charging process. However, the prediction of the charging time is easily affected by the charging parameters, which include but are not limited to the ambient temperature during charging, the connection status of the external device, etc. Therefore, in this embodiment, when the portable WIFI is charging, when the ambient temperature does not change much, the historical charging time and historical charging parameters of the battery in the corresponding power interval are obtained, and it is determined whether the current charging parameters of the portable WIFI are consistent with the historical charging parameters. If the current charging parameters are consistent with the historical charging parameters, the charging power of the current charging time is determined according to the historical charging time in the circuit interval. For example, in the power interval of (0, 100), it takes 100 minutes to fully charge the battery according to the historical charging parameters. If the current charging parameters are consistent with the historical charging parameters, the charging power of the current charging time is determined according to the charging power per minute within 100 minutes, and the charging power is displayed on the display device of the portable WIFI.
[0078] It should be understood that if the current charging parameters are inconsistent with the historical charging parameters, they need to be corrected according to the difference in the charging parameters. For example, when the ambient temperature during charging is inconsistent, it is necessary to calculate the battery charging capacity in real time according to the aforementioned power change curve. When the portable WIFI is also connected to multiple external devices during charging, it is necessary to subtract the power consumption of the external devices from the battery charging capacity, so as to accurately display the power on the display device of the portable WIFI.
[0079] Optionally, when predicting the charging power corresponding to the current charging time through historical charging data, an exponential smoothing model can be used to predict the charging power. In this embodiment, it is first necessary to collect the power data of the battery during the historical charging process, including but not limited to the charging time and the corresponding power value. Secondly, a suitable exponential smoothing model is selected according to the change of the current ambient temperature. For example, when the current ambient temperature does not change much and tends to be stable, the impact on the battery power detection is not great. A single exponential smoothing model can be selected, and its prediction formula is: F t =aY t +(1-a)F t-1 , where F t is the predicted value of period t, Y t is the actual value in period t; F t-1 is the predicted value of period t-1, and a is the smoothing coefficient. The current ambient temperature changes greatly (the change in ambient temperature per unit time is greater than 0.1°C), which will have a greater impact on battery power detection. Therefore, it is necessary to use the quadratic exponential smoothing model to introduce historical data trends to improve the accuracy of the prediction. The prediction formula is: F t =aY t +(1-a)(F t-1 +T t-1 );T t =b(F t -F t-1 )+(1-b)T t-1 , where T t Represents the trend value of period t, T t-1It represents the trend value of period t-1, b is the smoothing coefficient, and the quadratic exponential smoothing method further considers the change of trend. If the current ambient temperature changes greatly, the charging power corresponding to the current charging time can be predicted by the change of historical trend. According to the fluctuation of data and prediction requirements, select the appropriate smoothing coefficient and substitute it into the exponential smoothing model. For example, if the ambient temperature changes greatly, the smoothing coefficient is selected in the range of 0.6 to 0.8. If the ambient temperature changes tend to be stable, the range of 0.1 to 0.3 is selected. Use the selected exponential smoothing model to fit the collected data and calculate the smoothed power value. This current value is equivalent to the smoothed value and is used to predict the future current value. According to the fitted model and the current charging time, the future power value is predicted.
[0080] Based on the embodiment scheme of the above application, the battery power and charging time curve of the portable WIFI at the current ambient temperature are obtained; the actual battery power is determined according to the power change curve and the charging time; the power consumption of the portable WIFI when the external device is connected to the portable WIFI is detected; the remaining battery power is determined according to the actual power and power consumption. Through the implementation of the scheme of this application, the actual battery power of the portable WIFI is determined by the voltage change when the battery is charging, and during the connection process between the portable WIFI and the external device, the temperature and voltage of the battery do not need to be considered, and the remaining battery power is directly determined by the power consumption of the external device connected to the portable WIFI, thereby improving the detection efficiency of the battery power while ensuring the accuracy of the power display.
[0081] Figure 2 A portable WIFI battery power detection device is provided in an embodiment of the present application. The portable WIFI battery power detection device can be used to implement the portable WIFI battery power detection method in the aforementioned embodiment. Figure 2 As shown, the battery power detection device of the portable WIFI mainly includes:
[0082] The acquisition module 10 is used to obtain the battery power change curve of the portable WIFI and the charging time under the current ambient temperature;
[0083] The first determination module 20 is used to determine the actual power of the battery of the portable WIFI according to the power change curve and the charging time;
[0084] The detection module 30 is used to detect the power consumption of the portable WIFI when an external device is connected to the portable WIFI;
[0085] The second determining module 40 is used to determine the remaining power of the battery according to the actual power and the power consumption.
[0086] In an optional implementation of the present embodiment, the acquisition module is specifically used to: obtain the mapping relationship between the battery voltage and the battery power of the portable WIFI under the current ambient temperature; determine the change value of the battery voltage during the charging time according to the mapping relationship; determine the power change curve of the battery power and the charging time according to the change value of the battery voltage.
[0087] Furthermore, in an optional implementation of the present embodiment, when the acquisition module executes the function of acquiring the mapping relationship between the battery voltage and the battery power at the current ambient temperature, it is specifically used to: acquire battery parameters at different ambient temperatures; wherein the battery parameters include the battery power and the battery voltage; construct a power calculation model according to the battery parameters at different ambient temperatures; calibrate the power calculation model according to the test parameters corresponding to the battery parameters; after the power calculation model calibration is completed, acquire the mapping relationship between the battery voltage and the battery power at the current ambient temperature.
[0088] In an optional implementation of this embodiment, the detection module is specifically used to: obtain the connection duration of the external device and the corresponding traffic usage information; determine the power consumption of the external device by substituting the connection duration and the corresponding traffic usage information into a preset power consumption calculation formula.
[0089] Furthermore, in an optional implementation of the present embodiment, the second determination module is specifically used to: obtain the target ambient temperature and the target battery voltage during power consumption detection; substitute the target ambient temperature and the target battery voltage into the power calculation model to determine the target battery power; determine whether the difference between the actual power and the power consumption, and the deviation value between the actual power and the target battery power is less than a preset threshold; if the deviation value is less than the preset threshold, determine the difference as the remaining power of the battery.
[0090] Furthermore, in an optional implementation of this embodiment, the battery power detection device of the portable WIFI also includes: a judgment module. The acquisition module is also used to: obtain the historical charging time and historical charging parameters of the battery in the corresponding power interval. The judgment module is used to: determine whether the current charging parameters are consistent with the historical charging parameters. The first determination module is also used to: if the current charging parameters are consistent with the historical charging parameters, determine the charging power of the current charging time according to the historical charging time in the power interval.
[0091] According to the portable WIFI battery power detection device provided by the present application, the battery power change curve of the portable WIFI battery power and the charging time at the current ambient temperature is obtained; the actual battery power is determined according to the power change curve and the charging time; the power consumption of the portable WIFI when the external device is connected to the portable WIFI is detected; the remaining battery power is determined according to the actual power and power consumption. Through the implementation of the present application, the actual battery power of the portable WIFI battery is determined by the voltage change when charging, and during the connection process between the portable WIFI and the external device, the battery temperature and voltage do not need to be considered, and the remaining battery power is directly determined by the power consumption of the external device connected to the portable WIFI, thereby improving the detection efficiency of the battery power while ensuring the accuracy of the power display.
[0092] Figure 3 An electronic device provided in an embodiment of the present application. The electronic device can be used to implement the battery power detection method of the portable WIFI in the aforementioned embodiment, mainly comprising:
[0093] The memory 301, the processor 302 and the computer program 303 stored in the memory 301 and executable on the processor 302, the memory 301 and the processor 302 are connected by communication. When the processor 302 executes the computer program 303, the battery power detection method of the portable WIFI in the aforementioned embodiment is implemented. The number of processors can be one or more.
[0094] The memory 301 may be a high-speed random access memory (RAM) memory, or a non-volatile memory (non-volatile memory), such as a disk memory. The memory 301 is used to store executable program codes, and the processor 302 is coupled to the memory 301 .
[0095] Furthermore, the present application also provides a computer-readable storage medium, which may be provided in the electronic device in the above embodiments. Figure 3 Memory in the illustrated embodiment.
[0096] The computer readable storage medium stores a computer program, and when the program is executed by the processor, the battery power detection method of the portable WIFI in the aforementioned embodiment is implemented. Furthermore, the computer storable medium can also be a U disk, a mobile hard disk, a read-only memory (ROM), a RAM, a magnetic disk or an optical disk, etc., which can store program codes.
[0097] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules 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 interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0098] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0099] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.
[0100] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a readable storage medium, including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned readable storage medium includes: U disk, mobile hard disk, ROM, RAM, disk or CD-ROM and other media that can store program codes.
[0101] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0102] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0103] The above is a description of the battery power detection method and related devices for the portable WIFI provided in this application. For technicians in this field, according to the ideas of the embodiments of this application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present application.
Claims
1. A method for detecting battery power of a portable WIFI, characterized in that: include: Get the battery power change curve of the portable WIFI and the charging time under the current ambient temperature; Determine the actual power of the battery of the portable WIFI according to the power change curve and the charging time; detect the power consumption of the portable WIFI when an external device is connected to the portable WIFI; determine the remaining power of the battery according to the actual power and the power consumption; The step of obtaining a battery power change curve of the portable WIFI and the charging time at the current ambient temperature includes: obtaining a mapping relationship between the battery voltage of the portable WIFI and the battery power at the current ambient temperature; determining a change value of the battery voltage during the charging time according to the mapping relationship; and determining a battery power change curve of the battery power and the charging time according to the change value of the battery voltage; The step of obtaining the mapping relationship between the battery voltage and the battery power at the current ambient temperature includes: obtaining battery parameters at different ambient temperatures; wherein the battery parameters include the battery power and the battery voltage; constructing a power calculation model according to the battery parameters at different ambient temperatures; calibrating the power calculation model according to the test parameters corresponding to the battery parameters; after the calibration of the power calculation model is completed, obtaining the battery power corresponding to the battery voltage at the current ambient temperature, and determining the mapping relationship between the battery voltage and the battery power; External devices need to connect to the portable WIFI through a preset password. After the password is verified, the portable WIFI provides a wireless network for the external device. In the connection state and the process of the external device using data flow, the power of the portable WIFI will be continuously consumed. The remaining power of the portable WIFI can be detected by detecting the power consumption of the external device. The remaining power of the battery can be determined by subtracting the power consumption of the external device from the actual power of the battery; The step of determining the remaining power of the battery according to the actual power and the power consumption includes: obtaining a target ambient temperature and a target battery voltage during the power consumption detection; substituting the target ambient temperature and the target battery voltage into the power calculation model to determine the target battery power; judging whether a deviation value between a difference between the actual power and the power consumption and a deviation value between the target battery power is less than a preset threshold; if the deviation value is less than the preset threshold, determining the difference as the remaining power of the battery; Due to the existence of the power consumption of the portable WIFI itself, when the difference between the actual power and the power consumption, and the deviation value from the target battery power is greater than the preset threshold, it is determined that the power consumption of the portable WIFI itself is too large, and the historical static power consumption of the portable WIFI when not connected to the external device is obtained, and the current power consumption of the portable WIFI itself is determined according to the mapping relationship between the historical static power consumption and the static time, and the remaining power of the battery is determined according to its own power consumption and the power consumption of the external device.
2. The method for detecting battery power of a portable WIFI according to claim 1, characterized in that: The step of detecting the power consumption of the portable WIFI when an external device is connected to the portable WIFI includes: obtaining the connection duration of the external device and corresponding traffic usage information; and determining the power consumption of the external device by substituting the connection duration and the corresponding traffic usage information into a preset power consumption calculation formula.
3. The method for detecting battery power of portable WIFI according to claim 2, characterized in that: The step of determining the power consumption of the external device by substituting the connection duration and the corresponding traffic usage information into a preset power consumption calculation formula includes: calculating the power consumption by the preset power consumption calculation formula: Among them, Wh is the power consumption, i is the number of connections of external devices, i=1,2,3...n, Ti is the connection duration of the i-th external device, k1 is the power consumption coefficient corresponding to the connection duration, k2 is the traffic power consumption coefficient, and f(i) is the traffic usage information.
4. The method for detecting battery power of a portable WIFI according to claim 1, characterized in that: The method also includes: obtaining the historical charging time and historical charging parameters of the battery in the corresponding power range; judging whether the current charging parameters are consistent with the historical charging parameters; if the current charging parameters are consistent with the historical charging parameters, determining the charging power of the current charging time in the power range according to the historical charging time.
5. A portable WIFI battery power detection device using the portable WIFI battery power detection method according to any one of claims 1 to 4, characterized in that: include: An acquisition module is used to obtain a battery change curve of the portable WIFI battery power and charging time under the current ambient temperature; A first determining module, used to determine the actual power of the battery according to the power change curve and the charging time; A detection module, used to detect the power consumption of the portable WIFI when an external device is connected to the portable WIFI; The second determining module is used to determine the remaining power of the battery according to the actual power and the power consumption.
6. An electronic device, characterized in that: It comprises a memory and a processor, wherein: the processor is used to execute a computer program stored in the memory; when the processor executes the computer program, the steps in the battery power detection method of the portable WIFI described in any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps in the battery power detection method of a portable WIFI described in any one of claims 1 to 4 are implemented.
