Power supply electric quantity management method and device, monitoring equipment and storage medium
By acquiring and processing multiple voltage values in the power supply device to determine the control instructions, the voltage fluctuation problem of the power supply device when different functions are started is solved, ensuring the accuracy of the power display and user experience.
Patent Information
- Application Number
- CN202410313862.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-19
- Publication Date
- 2025-09-26
AI Technical Summary
The power consumption of the power supply device changes when different functions are activated, causing the battery supply voltage to fluctuate, affecting the accuracy of the battery power display, which may cause false alarms and reduce the user experience.
By obtaining multiple voltage values of the power supply device in the current acquisition cycle, processing these voltage values to obtain the current comparison voltage, determining the control instructions based on the comparison voltage and the calibration voltage, and controlling the status of the power supply device to filter out the impact of voltage fluctuations and ensure the accuracy of the power display.
Improves the accuracy of power display and alarm of power supply equipment, ensures users can replace batteries in time, and improves user experience.
Smart Images

Figure CN120710140A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power supply equipment, and in particular to a power supply power management method, device, monitoring equipment and storage medium. Background Art
[0002] When a power supply device (hereinafter referred to as the device) is battery-powered, it is necessary to ensure that the device can operate normally with sufficient power to safely and accurately implement the corresponding functions. Therefore, it is necessary to provide feedback to the user so that the user can intuitively understand the remaining battery power. When the battery is low, a prompt will be issued, and the battery can be replaced in time to avoid the adverse effects of low battery power on the implementation of device functions, thereby affecting the user experience.
[0003] However, when the device is working, the power consumption of the device will change due to the activation of different functions of the device. At this time, the battery supply voltage will fluctuate to varying degrees. During voltage detection, the corresponding fluctuating voltage will be detected, that is, the collected voltage may be lower than the actual voltage value at that time, resulting in low accuracy of the battery power displayed by the device. Summary of the Invention
[0004] In view of this, the present invention provides a power supply power management method, apparatus, monitoring device and storage medium to solve the problem of low accuracy of battery power displayed by power supply equipment.
[0005] In a first aspect, the present invention provides a power supply power management method, comprising: obtaining multiple voltage values of the power supply of a power supply device in a current acquisition cycle; processing the multiple voltage values of the current acquisition cycle to obtain a current comparison voltage, wherein the current comparison voltage is used to characterize the voltage condition of the power supply in the current acquisition cycle; determining a control instruction based on the current comparison voltage and the current calibration voltage to control the state of the power supply device, wherein the current calibration voltage is a calibration voltage corresponding to the current displayed power of the power supply device, and the control instruction includes one or more of a first instruction for controlling the power supply device to change the currently displayed power, a second instruction for controlling the power supply device to maintain the currently displayed power, a third instruction for controlling the power supply device to issue a low power alarm, and a fourth instruction for controlling the power supply device not to cause a low power alarm.
[0006] The power supply power management method provided in this embodiment obtains multiple voltage values of the power supply device during the current acquisition cycle, processes the multiple voltage values during the current acquisition cycle to obtain a current comparison voltage, and then determines a control instruction based on the current comparison voltage and the current calibration voltage to control the state of the power supply device. In this embodiment, by comparing the calibration voltage with the comparison voltage determined from the multiple voltage values to determine the control instruction, and then adjusting the state of the power supply device based on the control instruction, the impact of voltage fluctuations can be filtered out, ensuring that the power display matches the actual power value, improving the accuracy of the power display and alarms of the power supply device, ensuring the normal functional experience of the user during use, and providing timely feedback for battery replacement, thereby improving the user experience.
[0007] In an optional embodiment, a control instruction is determined based on the current comparison voltage and the current calibration voltage, including: entering a sliding filter window, when the number of first comparison voltages is greater than or equal to a first preset number, the control instruction includes a first instruction and / or a third instruction, wherein the sliding filter window includes multiple acquisition cycles, and the first comparison voltage is a current comparison voltage among multiple current comparison voltages that is less than the current calibration voltage; when the number of first comparison voltages is less than the first preset number, the control instruction includes a second instruction and / or a fourth instruction.
[0008] In this embodiment, after determining the current comparison voltage, the control instruction is determined based on the number of the first comparison voltage among multiple current comparison voltages, which can avoid briefly crossing the current calibration voltage, causing the power display to jump or triggering a low power alarm, and thus effectively filter out the adverse effects of unpredictable short-term voltage fluctuations on the power display or triggering false low power alarms, while also ensuring the accuracy of voltage detection.
[0009] In an optional implementation, entering the sliding filter window includes: entering the sliding filter window when the current comparison voltage is less than the current calibration voltage.
[0010] In this embodiment, when the current comparison voltage is less than the current calibration voltage, the sliding filter window is entered instead of entering the sliding filter window every time a comparison voltage is determined, which can improve the efficiency of determining the control instruction.
[0011] In an optional implementation, after entering the sliding filter window, the method further includes: opening a flag bit, wherein the flag bit is used for counting; and determining the number of the first comparison voltages through the flag bit.
[0012] In an optional embodiment, before entering the sliding filtering window, the method also includes: when the function turned on by the power supply device is not a preset function triggered in response to the user, determining the duration of the sliding filtering window based on the duration of the function turned on by the power supply device.
[0013] In this embodiment, before entering the sliding filter window, the duration of the sliding filter window is determined based on the duration of the function turned on by the power supply device, ensuring that the power supply device can fully monitor the entire process of function execution and improve the accuracy of the power display and alarm of the power supply device.
[0014] In an optional embodiment, the duration of the acquisition cycle is an even number, and the duration of the sliding filter window is determined based on the duration of the function of the power supply device being turned on, including: rounding the duration to an even integer to obtain an updated duration; and determining the sum of the updated duration and a second preset number of acquisition cycles as the duration of the sliding filter window.
[0015] In an optional embodiment, before determining the control instruction based on the current comparison voltage and the current calibration voltage, the method also includes: obtaining the discharge curve of the power supply of the power supply device at rated power; determining the minimum voltage to ensure the normal operation of the power supply device; and determining the calibration voltage corresponding to different power ranges based on the full-charge voltage, minimum voltage and discharge curve of the power supply of the power supply device.
[0016] In an optional embodiment, the method also includes: determining whether the function turned on by the power supply device is a preset function triggered in response to a user; in the case that the function turned on by the power supply device is a preset function triggered in response to a user, the control instruction is a second instruction; determining the control instruction based on the current comparison voltage and the current calibration voltage, including: in the case that the function turned on by the power supply device is not a preset function triggered in response to a user, determining the control instruction based on the current comparison voltage and the current calibration voltage.
[0017] In an optional implementation, the current comparison voltage is an average value of multiple voltage values, a variance of multiple voltage values, or a mean square error of multiple voltage values.
[0018] In a second aspect, the present invention provides a power supply power management device, the device comprising: a first acquisition module, for acquiring multiple voltage values of the power supply of the power supply device in a current acquisition cycle; a processing module, for processing the multiple voltage values of the current acquisition cycle to obtain a current comparison voltage, wherein the current comparison voltage is used to characterize the voltage condition of the power supply in the current acquisition cycle; a first determination module, for determining a control instruction based on the current comparison voltage and the current calibration voltage to control the state of the power supply device, wherein the current calibration voltage is the calibration voltage corresponding to the currently displayed power of the power supply device, and the control instruction comprises one or more of a first instruction for controlling the power supply device to change the currently displayed power, a second instruction for controlling the power supply device to maintain the currently displayed power, a third instruction for controlling the power supply device to issue a low power alarm, and a fourth instruction for controlling the power supply device not to cause a low power alarm.
[0019] In an optional embodiment, the first determination module includes: a first determination unit, configured to enter a sliding filter window, and when the number of first comparison voltages is greater than or equal to a first preset number, the control instruction includes a first instruction and / or a third instruction, wherein the sliding filter window includes a plurality of acquisition cycles, and the first comparison voltage is a current comparison voltage among the plurality of current comparison voltages that is less than a current calibration voltage;
[0020] The second determining unit is configured to, when the number of the first comparison voltages is less than a first preset number, control the instruction to include the second instruction and / or the fourth instruction.
[0021] In an optional implementation, the first determination module includes: a third determination unit, configured to enter the sliding filter window when the current comparison voltage is less than the current calibration voltage.
[0022] In an optional embodiment, the device further includes: an opening module for opening a flag bit, wherein the flag bit is used for counting; and a second determination module for determining the number of the first comparison voltages through the flag bit.
[0023] In an optional embodiment, the device also includes: a third determination module, which is used to determine the duration of the sliding filtering window according to the duration of the function turned on by the power supply device when the function turned on by the power supply device is not a preset function triggered in response to the user.
[0024] In an optional embodiment, the third determination module includes: a fourth determination unit, used to round the duration to an even integer to obtain an updated duration; and a fifth determination unit, used to determine the sum of the updated duration and a second preset number of acquisition cycles as the duration of the sliding filter window.
[0025] In an optional embodiment, the device also includes: a second acquisition module, used to obtain the discharge curve of the power supply of the power supply device at rated power; a fourth determination module, used to determine the minimum voltage to ensure the normal operation of the power supply device; and a fifth determination module, used to determine the calibration voltage corresponding to different power ranges based on the full-charge voltage, minimum voltage and discharge curve of the power supply of the power supply device.
[0026] In an optional embodiment, the device also includes: a sixth determination module, used to determine whether the function turned on by the power supply device is a preset function triggered in response to a user; a seventh determination module, used to determine the control instruction as the second instruction when the function turned on by the power supply device is a preset function triggered in response to a user; the first determination module includes: a sixth determination unit, used to determine the control instruction according to the current comparison voltage and the current calibration voltage when the function turned on by the power supply device is not a preset function triggered in response to a user.
[0027] In an optional implementation, the current comparison voltage is an average value of multiple voltage values, a variance of multiple voltage values, or a mean square error of multiple voltage values.
[0028] In a third aspect, the present invention provides a monitoring device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0029] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in related technologies, the following briefly introduces the drawings required for use in the specific embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0031] Figure 1 is a flow chart of a power supply and power management method according to an embodiment of the present invention;
[0032] Figure 2 is a flow chart of another power supply and power management method according to an embodiment of the present invention;
[0033] Figure 3 is a schematic diagram of an acquisition period and a sliding filter window according to an embodiment of the present invention;
[0034] Figure 4 is a flow chart of another power management method according to an embodiment of the present invention;
[0035] Figure 5 is a structural block diagram of a power supply and power management device according to an embodiment of the present invention;
[0036] Figure 6 Schematic diagram of the hardware structure of the monitoring device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0037] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are 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 those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.
[0038] During the use of power supply equipment, if the user can understand the remaining battery power of the device, the battery can be replaced in time to avoid the adverse effects of insufficient battery power on the device function and thus affect the user experience.
[0039] Currently, the device's remaining battery charge is typically adjusted dynamically based on the detected voltage value. However, regardless of whether the device uses lithium batteries or AA batteries, the device's power consumption varies as different system functions are activated during operation. At this point, the battery supply voltage fluctuates to varying degrees. Specifically, when the high-power function is enabled, the collected power supply voltage may be lower than the actual voltage value. When the high-power function is disabled, the power supply voltage returns to near the actual voltage value. Consequently, the remaining battery charge may briefly fluctuate, affecting the accuracy of the displayed battery charge and causing false alarms.
[0040] In view of this, the present invention provides a power supply power management method. After determining multiple voltage values, the multiple voltage values of the current acquisition cycle are processed to obtain the current comparison voltage, and then the control instructions are determined based on the current comparison voltage and the current calibration voltage. This can filter out the influence of voltage fluctuations, make the power display consistent with the actual power value, and improve the user experience.
[0041] According to an embodiment of the present invention, an embodiment of a power supply power management method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a power supply device such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0042] In this embodiment, a power supply power management method is provided, which can be used for power supply equipment that needs to display the remaining battery power, such as monitoring equipment. Figure 1 FIG. 1 is a flow chart of a power management method according to an embodiment of the present invention. Figure 1 As shown, the method includes the following steps:
[0043] Step S101: Acquire multiple voltage values of a power supply of a power supply device in a current acquisition cycle.
[0044] For example, when the device is running, the voltage of the battery can be collected in real time by using an analog-to-digital converter (ADC) built into the microprocessor, thereby obtaining multiple voltage values of the current collection period.
[0045] The acquisition period is the maximum time interval between a third preset number of acquisition moments. The third preset number can be configured by personnel based on experience. For example, if the ADC acquires the power supply voltage every 100 ms and the third preset number is 20, then the acquisition period is 2 seconds. Specifically, the number of the multiple voltage values is the third preset number. That is, based on the above example, the device can acquire 20 voltage values every 2 seconds.
[0046] Step S102 : Process multiple voltage values in the current acquisition period to obtain a current comparison voltage.
[0047] The current comparison voltage is used to characterize the voltage condition of the power supply in the current acquisition cycle.
[0048] The present invention does not limit the method of processing multiple voltage values. For example, the average value of multiple voltage values can be used as the current comparison voltage, the variance of multiple voltage values can be used as the current comparison voltage, or the mean square error of multiple voltage values can be used as the current comparison voltage.
[0049] Step S103 : determining a control instruction according to the current comparison voltage and the current calibration voltage to control the state of the power supply device.
[0050] The current calibrated voltage is the calibrated voltage corresponding to the current displayed power level of the device. The control instruction includes one or more of a first instruction for controlling the device to change the currently displayed power level, a second instruction for controlling the device to maintain the currently displayed power level, a third instruction for controlling the device to issue a low-power alarm, and a fourth instruction for controlling the device not to issue a low-power alarm.
[0051] Exemplarily, the calibration voltage corresponding to the displayed power level can be determined through experiments. For example, the discharge curve of the battery used in the device (such as a lithium battery or an AA battery) at the rated power is obtained, and the lowest voltage at which the device can work normally is tested. Then, based on the discharge curve, the interval between the full-charge voltage and the minimum operating voltage of the battery is evenly divided according to the power percentage, and the voltage thresholds corresponding to different power intervals are calibrated (i.e., the calibration voltage), and the low-battery alarm voltage is set at the minimum operating voltage value.
[0052] For example, when the current comparison voltage is less than the current calibration voltage, the control instructions include a first instruction to control the device to adjust the currently displayed power level based on the current comparison voltage. At this point, if the current calibration voltage is the minimum voltage, the control instructions may also include a third instruction to control the device to issue a low-battery alarm. If the current calibration voltage is not the minimum voltage, the control instructions may also include a fourth instruction to control the device not to issue a low-battery alarm.
[0053] When the current comparison voltage is greater than or equal to the current calibration voltage, the control instruction includes a second instruction to control the device to maintain the current displayed power. At this time, the control instruction may also include a fourth instruction to control the device not to issue a low power alarm.
[0054] The power supply power management method provided in this embodiment obtains multiple voltage values of the power supply device during the current acquisition cycle, processes the multiple voltage values during the current acquisition cycle to obtain a current comparison voltage, and then determines a control instruction based on the current comparison voltage and the current calibration voltage to control the state of the power supply device. In this embodiment, by comparing the calibration voltage with the comparison voltage determined from the multiple voltage values to determine the control instruction, and then adjusting the device state based on the control instruction, the impact of voltage fluctuations can be filtered out, ensuring that the power display matches the actual power value, improving the accuracy of the device's power display and alarms, ensuring the user's normal functional experience during use, and providing timely feedback for battery replacement, thereby improving the user's user experience.
[0055] In this embodiment, a power supply power management method is provided, which can be used for power supply equipment that needs to display the remaining battery power, such as monitoring equipment. Figure 2 FIG. 1 is a flow chart of another power management method according to an embodiment of the present invention. Figure 2 As shown, the method includes the following steps:
[0056] Step S201: Acquire multiple voltage values of a power supply of a power supply device in a current acquisition cycle.
[0057] For details, please see Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0058] Step S202 : Process multiple voltage values in the current acquisition period to obtain a current comparison voltage.
[0059] For details, please see Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.
[0060] Step S203: determining a control instruction according to the current comparison voltage and the current calibration voltage.
[0061] Specifically, the above step S203 includes:
[0062] Step S2031 , entering a sliding filter window, when the number of first comparison voltages is greater than or equal to a first preset number, the control instruction includes the first instruction and / or the third instruction.
[0063] The sliding filter window includes multiple acquisition cycles, and the first comparison voltage is the current comparison voltage that is smaller than the current calibration voltage among the multiple current comparison voltages. The first preset number can be configured in advance by the staff. Specifically, the sliding filter window can be a time window, and the duration of the time window is greater than the duration of the acquisition cycle. The relationship between the sliding filter window, the acquisition cycle and the acquisition time can be as follows: Figure 3 shown.
[0064] Exemplarily, the sliding filter window includes 7 acquisition cycles, each acquisition cycle has a corresponding comparison voltage, and when the comparison voltage is less than the current calibration voltage, the comparison voltage is the first comparison voltage, and so on, the number of first comparison voltages in the sliding filter window can be determined. For example, the number of first comparison voltages is 5, and the first preset number is 4. At this time, the number of first comparison voltages (5) is greater than the first preset number (4), and the control instruction includes the first instruction and / or the third instruction. That is, the control instruction can be the first instruction or the third instruction, or the control instruction can be the first instruction and the third instruction. For example, when the current calibration voltage is the lowest voltage, the control instruction can be the first instruction and the third instruction, and the control device changes the current displayed power and issues a low voltage alarm.
[0065] Exemplarily, after entering the sliding filter window, the power management method further includes: opening a flag bit; determining the number of first comparison voltages through the flag bit, wherein the flag bit can be a space opened by software, the initial value can be set according to demand, and the flag bit is used for counting.
[0066] In some optional embodiments, the above-mentioned step S2031 can be specifically as follows: when the current comparison voltage is less than the current calibration voltage, enter the sliding filter window; when the number of first comparison voltages is greater than or equal to the first preset number, the control instruction includes the first instruction and / or the third instruction.
[0067] Specifically, after obtaining the current comparison voltage, if the current comparison voltage is less than the current calibration voltage, the sliding filter window is entered to determine the number of the first comparison voltage, and then the control instruction is determined; if the current comparison voltage is greater than or equal to the current calibration voltage, the control instruction can be directly determined as the second instruction, and then multiple voltage values of the next acquisition cycle are obtained, and the multiple voltage values are processed to obtain the next comparison voltage (that is, the new current comparison voltage).
[0068] In this embodiment, when the current comparison voltage is less than the current calibration voltage, the sliding filter window is entered instead of entering the sliding filter window every time a comparison voltage is determined, which can improve the efficiency of determining the control instruction.
[0069] In some other optional implementations, after obtaining the current comparison voltage, a sliding filter window is entered to determine the number of first comparison voltages, and then determine the control instruction.
[0070] In some optional embodiments, before executing step S2031, the power management method also includes: when the function turned on by the power device is not a preset function triggered in response to the user, determining the duration of the sliding filter window based on the duration of the function turned on by the power device.
[0071] Specifically, the device includes functions that need to be triggered by the user (i.e., functions that can predictably cause voltage fluctuations), such as blood pressure measurement, etc. The device also includes functions that are internally spontaneously started (i.e., functions that can unexpectedly cause voltage fluctuations), such as the wireless communication module sending data (physiological parameters, etc.) or technical alarms, etc.
[0072] In this embodiment, if the function turned on by the device is a preset function triggered in response to the user, the control instruction can be directly determined as the second instruction to control the device to maintain the currently displayed power level. For example, in response to the user trigger, the function turned on by the device is the preset function triggered by the user (blood pressure measurement). The blood pressure measurement task can be marked as a high-load task (that is, a task with power consumption greater than the preset power consumption). Voltage data is continuously collected during the blood pressure measurement, but no power display command is issued, that is, the displayed power level is not updated, thereby ensuring that the voltage fluctuation caused by the blood pressure measurement is not identified as a power outage, thereby causing the power display to jump.
[0073] If the function turned on by the device is not a preset function triggered by the user, before entering the sliding filter window, it is necessary to determine the duration of the sliding filter window based on the duration of the function turned on by the device to ensure that the device can fully monitor the entire process of function execution and improve the accuracy of the device's power display and alarm.
[0074] Exemplarily, the step of determining the duration of the sliding filter window according to the duration of the function of the power supply device being turned on may include step a1 and step a2:
[0075] Step a1: round the duration up to an even integer to obtain an updated duration.
[0076] Step a2: Determine the sum of the updated duration and the second preset number of acquisition cycles as the duration of the sliding filter window.
[0077] For example, the duration can be recorded as M, and the duration of the sliding filter window can be recorded as N. N should include all of M and have at least one more acquisition cycle, that is, N = M' + P × Q, where M' is the updated duration, the updated duration is an even integer rounded to the nearest integer, P is the second preset number, and Q is the duration of the acquisition cycle.
[0078] For example, if P is 2 and Q is 2s, when M is 4.5s, M carries an even integer of 6 (i.e., M'=6), and N=6+4=10s. If M is 3s, M carries an even integer of 4 (i.e., M'=4), and N=4+4=8s.
[0079] Step S2032: When the number of the first comparison voltages is less than the first preset number, the control instruction includes the second instruction and / or the fourth instruction.
[0080] Specifically, when the number of the first comparison voltages is less than the first preset number, the control instruction may be the second instruction or the fourth instruction, controlling the device to maintain the currently displayed power or controlling the device not to issue a low power alarm; the control instruction may also be the second instruction and the fourth instruction, controlling the device to maintain the currently displayed power and not to issue a low power alarm.
[0081] The power supply power management method provided in this embodiment, after obtaining multiple voltage values of the power supply of the power supply device in the current acquisition cycle, processes the multiple voltage values in the current acquisition cycle to obtain the current comparison voltage, and then enters the sliding filter window. When the number of first comparison voltages is greater than or equal to the first preset number, the control instruction includes the first instruction and / or the third instruction; when the number of first comparison voltages is less than the first preset number, the control instruction includes the second instruction and / or the fourth instruction. In this embodiment, after determining the current comparison voltage, the control instruction is determined based on the number of first comparison voltages in the multiple current comparison voltages. This can avoid the phenomenon of briefly crossing the current calibration voltage, causing the power display to jump or triggering a low power alarm, and thus can effectively filter out the adverse effects of unexpected short-term voltage fluctuations on the power display or triggering a low power false alarm, while also ensuring the accuracy of voltage detection.
[0082] In this embodiment, a power supply power management method is provided, which can be used for power supply equipment that needs to display the remaining battery power, such as monitoring equipment. Figure 4 FIG. 1 is a flow chart of another power management method according to an embodiment of the present invention. Figure 4 As shown, the method includes the following steps:
[0083] Step S401: obtaining a discharge curve of a power supply of a power supply device at rated power.
[0084] Specifically, the rated power refers to the maximum power that the power supply can provide. The discharge curve is a graph that represents the changes in the output voltage and output current of the power supply over time under rated power conditions. The discharge curve of the power supply of the device at rated power can be determined by testing the corresponding equipment, or by obtaining the discharge curve of the power supply of the device at rated power from the relevant technical manual of the power supply.
[0085] Step S402: Determine the minimum voltage that ensures the normal operation of the power supply device.
[0086] For example, the minimum voltage required to ensure normal operation of the device can be determined through experiments or technical manuals.
[0087] Step S403 : determining calibration voltages corresponding to different power ranges according to the full-charge voltage, minimum voltage, and discharge curve of the power supply of the power supply device.
[0088] Specifically, according to the discharge curve, the interval between the full-charge voltage and the minimum operating voltage of the battery is evenly divided according to the power ratio, and the voltage thresholds (ie, calibration voltages) corresponding to different power intervals are calibrated.
[0089] Step S404: Acquire multiple voltage values of the power supply of the power supply device in the current acquisition cycle.
[0090] For details, please see Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0091] Step S405 , processing multiple voltage values of the current acquisition period to obtain a current comparison voltage.
[0092] For details, please see Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.
[0093] Step S406 , determining whether the function turned on by the power supply device is a preset function triggered by the user.
[0094] Step S407: When the function of the power supply device is a preset function triggered by the user, the control instruction is a second instruction.
[0095] Step S408 : When the function turned on by the power supply device is not a preset function triggered in response to the user, a control instruction is determined according to the current comparison voltage and the current calibration voltage.
[0096] Specifically, in this embodiment, if the function activated by the device is a preset function triggered by a user, the control instruction can be directly determined to be the second instruction, controlling the device to maintain the currently displayed power level. If the function activated by the device is not a preset function triggered by a user, the control instruction is determined based on the current comparison voltage and the current calibration voltage. The implementation method for determining the control instruction based on the current comparison voltage and the current calibration voltage can be as shown in step S203 above, and will not be repeated here.
[0097] The power supply and electricity management method provided by the present invention is described in detail below with reference to specific examples.
[0098] First, obtain the device's battery (lithium or AA) discharge curve at rated power to test the lowest voltage at which the device can operate normally. Then, based on the discharge curve, divide the range between the battery's full charge voltage and the minimum operating voltage into even intervals based on the battery charge percentage. Calibrate the voltage thresholds corresponding to different charge intervals (i.e., the calibration voltages mentioned above), and set the low-battery alarm voltage at the minimum operating voltage.
[0099] Secondly, set the voltage acquisition frequency. For example, the voltage value is collected once every 100ms through the ADC of the microcontroller unit (MCU), and the voltage value is written to the cache. The cache area can save 20 voltage data and implement the first-in-first-out principle. Each time the voltage is collected, the earliest voltage data before 1.9s is deleted. The MCU can update the displayed power every 2s, that is, send a command to update the displayed power every 2 seconds. At this time, the acquisition period in the above text is 2s, and 20 voltage values are obtained in each acquisition period. In this embodiment, selecting to collect the voltage every 100ms can ensure the accuracy of voltage acquisition. Since the system consumes power slowly, the displayed power does not need to be updated in real time, so updating every 2 seconds can meet the usage requirements.
[0100] After acquiring 20 voltage data points, the average value of the 20 voltage data points in the current cache (i.e., the data points two seconds before the refresh point) is calculated and recorded as the comparison voltage. Since the voltage data in the cache is exactly the voltage data from the previous two seconds, the average value calculated each time is independent of the previous value.
[0101] After determining the comparison voltage, use the comparison voltage to compare with the set voltage threshold. If the comparison voltage does not cross the voltage threshold of the current displayed power interval (that is, when the current comparison voltage is greater than or equal to the current calibration voltage), send a command not to change the displayed power; if the comparison voltage crosses the voltage threshold (that is, when the current comparison voltage is less than the current calibration voltage), enter the sliding filter window and open the flag bit at the same time. At this time, the comparison voltage is the average value of the real-time voltage collected in the previous two seconds, and this value is recorded as Vi (i = 1, 2, 3, 4...), the voltage threshold is denoted as X. Enter the determination algorithm. When V1 < X, increment the flag bit by 1. After waiting for 2 s, obtain a new comparison voltage value, denoted as V2. Compare the relationship between V2 and X. When V2 < X, increment the flag bit by 1. When V2 ≥ X, the flag bit remains unchanged. Wait for another 2 s to obtain a new comparison voltage value V3. After comparing it with X, perform the same operation on the flag bit as for V2, and perform multiple comparisons in sequence. At the end of the window, detect the flag bit (the flag bit reflects the quantity of the first comparison voltage), and determine the control instruction based on the status of the flag bit.
[0102] Before entering the sliding filter window, for tasks that can cause voltage fluctuations unpredictably (not in response to a preset function triggered by the user), such as the wireless communication module sending data or a technical alarm, etc., it is necessary to set the duration of the sliding filter window according to the characteristics of the preset function not in response to the user's trigger.
[0103] Specifically, first determine the duration and frequency of the task that can cause voltage fluctuations unpredictably. Denote this time as M. The duration of the sliding filter window should fully contain M and have at least one more judgment flag bit (i.e., the acquisition period). Therefore, the calculation method of N should be: round M up to an even integer, and then + 4 s, which is used as the duration of the sliding filter window, that is, N = round M up to an even integer + 4 s, where 4 s represents two judgment flag bits. For example, when M is 4.5 s, rounding M up to an even integer is 6, and the duration of the sliding filter window N = 6 + 4 = 10 s; when M = 3 s, rounding M up to an even integer is 4, and at this time the duration of the sliding filter window N = 4 + 4 = 8 s.
[0104] For example, taking the high - level alarm that causes the largest voltage fluctuation as an example, the alarm sound of the high - level alarm lasts about 5 s, that is, M = 5, rounding up to an even integer is 6. At this time, the duration of the sliding filter window N = 6 + 4 = 10 s. Therefore, determine the duration of the sliding filter window as 10 s. According to the description of the above comparison voltage value, it can be known that there are 5 comparison voltage values in 10 s. Judge whether the flag bit is greater than the first preset quantity at this time. If so, send an instruction to change the displayed battery level or a low - battery alarm instruction. If not, send an instruction not to change the displayed battery level or not to cause a low - battery alarm, and perform the next voltage comparison. Setting the duration of the sliding filter window to 10 s can effectively filter out the phenomenon that when the sampling for 2 s falls within the alarm sound response interval, it causes a low acquisition average value, briefly crosses the voltage determination threshold, resulting in a jump in the battery level display or triggering a low - battery alarm, etc. Furthermore, it can effectively filter out the adverse effects of unpredictably short - term voltage fluctuations on the battery level display or trigger a false low - battery alarm, and at the same time can also ensure the accuracy of voltage detection.
[0105] For tasks that can be expected to cause voltage fluctuations (i.e., in response to preset functions triggered by the user), taking blood pressure measurement as an example, since blood pressure measurement is a high-power function, the battery voltage will fluctuate greatly when the blood pressure measurement is started. Therefore, the blood pressure measurement task is marked as a high-load task. Voltage data is continuously collected during the blood pressure measurement, but no power display command is issued, that is, the displayed power is not updated, to ensure that the voltage fluctuation caused by the blood pressure measurement is not identified as a power outage, thereby causing the power display to jump.
[0106] This embodiment also provides a power management device for implementing the above-mentioned embodiments and preferred implementations. Details already described will not be repeated. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
[0107] This embodiment provides a power management device, such as Figure 5 Shown, including:
[0108] A first acquisition module 501 is configured to acquire multiple voltage values of a power supply of a power supply device in a current acquisition cycle;
[0109] The processing module 502 is used to process multiple voltage values in the current acquisition cycle to obtain a current comparison voltage, wherein the current comparison voltage is used to represent the voltage condition of the power supply in the current acquisition cycle;
[0110] The first determination module 503 is used to determine the control instruction based on the current comparison voltage and the current calibration voltage to control the state of the power supply device, wherein the current calibration voltage is the calibration voltage corresponding to the current displayed power of the power supply device, and the control instruction includes one or more of a first instruction to control the power supply device to change the currently displayed power, a second instruction to control the power supply device to maintain the currently displayed power, a third instruction to control the power supply device to issue a low power alarm, and a fourth instruction to control the power supply device not to cause a low power alarm.
[0111] In some optional implementations, the first determining module 503 includes:
[0112] a first determining unit, configured to enter a sliding filtering window, wherein when the number of first comparison voltages is greater than or equal to a first preset number, the control instruction includes a first instruction and / or a third instruction, wherein the sliding filtering window includes a plurality of acquisition cycles, and the first comparison voltage is a current comparison voltage among the plurality of current comparison voltages that is less than a current calibration voltage;
[0113] The second determining unit is configured to, when the number of the first comparison voltages is less than a first preset number, control the instruction to include the second instruction and / or the fourth instruction.
[0114] In some optional implementations, the first determining module 503 includes:
[0115] The third determining unit is configured to enter the sliding filtering window when the current comparison voltage is less than the current calibration voltage.
[0116] In some optional embodiments, the device further comprises:
[0117] A development module is used to develop a flag bit, wherein the flag bit is used for counting;
[0118] The second determining module is configured to determine the number of first comparison voltages through a flag bit.
[0119] In some optional embodiments, the device further comprises:
[0120] The third determining module is configured to determine the duration of the sliding filtering window according to the duration of the function turned on by the power supply device when the function turned on by the power supply device is not a preset function triggered in response to a user.
[0121] In some optional implementations, the third determining module includes:
[0122] A fourth determining unit is configured to round the duration to an even integer to obtain an updated duration;
[0123] The fifth determining unit is configured to determine the sum of the updated duration and the second preset number of acquisition cycles as the duration of the sliding filtering window.
[0124] In some optional embodiments, the device further comprises:
[0125] The second acquisition module is used to obtain a discharge curve of the power supply of the power supply device at rated power;
[0126] A fourth determining module, configured to determine a minimum voltage for ensuring normal operation of the power supply device;
[0127] The fifth determining module is used to determine the calibration voltage corresponding to different power ranges according to the full-charge voltage, minimum voltage and discharge curve of the power supply of the power supply device.
[0128] In some optional embodiments, the device further comprises:
[0129] a sixth determining module, configured to determine whether the function activated by the power supply device is a preset function triggered by a user;
[0130] a seventh determining module, configured to, when the function of the power supply device turned on is a preset function triggered by a user, determine that the control instruction is a second instruction;
[0131] The first determining module 503 includes:
[0132] The sixth determining unit is configured to determine a control instruction according to the current comparison voltage and the current calibration voltage when the function turned on by the power supply device is not a preset function triggered in response to a user.
[0133] In some optional implementations, the current comparison voltage is an average value of multiple voltage values, a variance of multiple voltage values, or a mean square error of multiple voltage values.
[0134] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0135] The power management device in this embodiment is presented in the form of a functional unit, where the unit refers to an application-specific integrated circuit (ASIC), a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0136] The embodiment of the present invention also provides a monitoring device having the above Figure 5 The power management device shown.
[0137] See also Figure 6 , Figure 6 Schematic diagram of a monitoring device provided by an optional embodiment of the present invention. Figure 6 As shown, the monitoring device includes: one or more processors 610, a memory 620, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the device, including instructions stored in or on the memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 610 is taken as an example.
[0138] Processor 610 may be a central processing unit, a network processor, or a combination thereof. Processor 610 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.
[0139] The memory 620 stores instructions that can be executed by at least one processor 610, so as to enable the at least one processor 610 to implement the method shown in the above embodiment.
[0140] The memory 620 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function; the data storage area may store data created based on the use of the device, etc. In addition, the memory 620 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 620 may optionally include a memory remotely located relative to the processor 610, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0141] The memory 620 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 620 may also include a combination of the above types of memory.
[0142] The device further includes a communication interface 630 for the device to communicate with other devices or a communication network.
[0143] The embodiments of the present invention also provide a computer-readable storage medium. The above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-transitory machine-readable storage medium and downloaded via a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that the monitoring device, processor, microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by the monitoring device, processor or hardware, the method shown in the above embodiment is implemented.
[0144] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A power supply and power management method, characterized in that: include: Obtain multiple voltage values of the power supply of the power supply device in the current acquisition cycle; Processing multiple voltage values of the current acquisition cycle to obtain a current comparison voltage, wherein the current comparison voltage is used to characterize the voltage condition of the power supply in the current acquisition cycle; A control instruction is determined based on the current comparison voltage and the current calibration voltage to control the state of the power supply device, wherein the current calibration voltage is the calibration voltage corresponding to the current displayed power of the power supply device, and the control instruction includes one or more of a first instruction to control the power supply device to change the currently displayed power, a second instruction to control the power supply device to maintain the currently displayed power, a third instruction to control the power supply device to issue a low power alarm, and a fourth instruction to control the power supply device not to cause a low power alarm.
2. The method according to claim 1, characterized in that The determining of the control instruction according to the current comparison voltage and the current calibration voltage includes: Entering a sliding filter window, when the number of first comparison voltages is greater than or equal to a first preset number, the control instruction includes the first instruction and / or the third instruction, wherein the sliding filter window includes multiple acquisition cycles, and the first comparison voltage is a current comparison voltage among multiple current comparison voltages that is smaller than the current calibration voltage; In a case where the number of the first comparison voltages is less than the first preset number, the control instruction includes the second instruction and / or the fourth instruction.
3. The method according to claim 2, characterized in that The step of entering the sliding filter window includes: When the current comparison voltage is less than the current calibration voltage, the sliding filter window is entered.
4. The method according to claim 2 or 3, characterized in that After entering the sliding filter window, the method further includes: Opening a flag bit, wherein the flag bit is used for counting; The number of the first comparison voltages is determined by the flag bit.
5. The method according to claim 2 or 3, characterized in that Before entering the sliding filter window, the method further includes: In a case where the function turned on by the power supply device is not a preset function triggered in response to a user, the duration of the sliding filter window is determined according to the duration of the function turned on by the power supply device.
6. The method according to claim 5, characterized in that The duration of the acquisition cycle is an even number, and determining the duration of the sliding filter window according to the duration of the function of the power supply device being turned on includes: Round up the duration to an even integer to obtain an updated duration; The sum of the updated duration and a second preset number of acquisition cycles is determined as the duration of the sliding filter window.
7. The method according to any one of claims 1 to 3, characterized in that Before determining the control instruction according to the current comparison voltage and the current calibration voltage, the method further includes: Obtaining a discharge curve of the power supply of the power supply device at rated power; Determining the minimum voltage to ensure normal operation of the power supply device; The calibration voltages corresponding to different power intervals are determined according to the full-charge voltage of the power supply of the power supply device, the minimum voltage and the discharge curve.
8. The method according to any one of claims 1 to 3, characterized in that The method further comprises: determining whether the function activated by the power supply device is a preset function triggered by a user; In a case where the function turned on by the power supply device is a preset function triggered in response to a user, the control instruction is the second instruction; The determining of the control instruction according to the current comparison voltage and the current calibration voltage includes: In a case where the function turned on by the power supply device is not a preset function triggered in response to a user, the control instruction is determined according to the current comparison voltage and the current calibration voltage.
9. The method according to any one of claims 1 to 3, characterized in that The current comparison voltage is an average value of the multiple voltage values, a variance of the multiple voltage values, or a mean square error of the multiple voltage values.
10. A power management device, characterized in that: The device comprises: A first acquisition module is used to acquire multiple voltage values of the power supply of the power supply device in a current acquisition cycle; a processing module, configured to process the multiple voltage values of the current acquisition cycle to obtain a current comparison voltage, wherein the current comparison voltage is used to characterize the voltage condition of the power supply in the current acquisition cycle; A first determination module is used to determine a control instruction based on the current comparison voltage and the current calibration voltage to control the state of the power supply device, wherein the current calibration voltage is the calibration voltage corresponding to the current displayed power of the power supply device, and the control instruction includes one or more of a first instruction to control the power supply device to change the currently displayed power, a second instruction to control the power supply device to maintain the currently displayed power, a third instruction to control the power supply device to issue a low power alarm, and a fourth instruction to control the power supply device not to cause a low power alarm.
11. A monitoring device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method according to any one of claims 1 to 9 by executing the computer instructions.
12. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a power supply device to execute the method according to any one of claims 1 to 9.